Skip to content

Commit

Permalink
update deployments/staging/docker-compose.yml (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealDyllon authored Jan 18, 2023
1 parent bcf7d4c commit fafbd49
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
PRIVATE_KEY: ${{ secrets.STAGING_EC2_PRIVATE_KEY }}
HOSTNAME : ${{ secrets.STAGING_EC2_HOSTNAME }}
USER_NAME : ${{ secrets.STAGING_EC2_USERNAME }}

run: |
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
echo "$PRIVATE_KEY" > private_key && chmod 770 private_key
ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} '
cd /home/github_actions_cd/containers &&
docker compose pull
wget -q https://raw.githubusercontent.com/ntuscse/website/main/deployments/staging/docker-compose.yml -O docker-compose.yml &&
docker compose pull &&
docker compose up -d
'
2 changes: 2 additions & 0 deletions deployments/staging/cms.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PAYLOAD_SECRET=
MONGODB_URI=
22 changes: 22 additions & 0 deletions deployments/staging/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

services:
cms:
image: ghcr.io/ntuscse/website/cms
ports:
- 80:3000
env_file:
- cms.env

mongo:
image: mongo:latest
ports:
- "27017:27017"
command:
- --storageEngine=wiredTiger
volumes:
- ./data:/data/db
logging:
driver: none

volumes:
data:

0 comments on commit fafbd49

Please sign in to comment.