Skip to content

Commit

Permalink
Set tag in docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
psiemens committed Jan 8, 2025
1 parent 79ba0f1 commit 9800ec1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ jobs:
- name: Update environment variables
run: ssh staging 'export $(gcloud secrets versions access latest --secret="ubyssey_env_configs" | xargs)'

# TODO: Fix this
# - name: Set tag in docker-compose.yml
# run: sed -i "s/\${TAG}/${{ github.ref }}/" docker-compose.yml
- name: Set tag in docker-compose.yml
run: sed -i "s/\${TAG}/${{ github.ref_name }}/g" docker-compose.yml

- name: Upload Docker Compose configuration
run: scp docker-compose.yml staging:/opt/ubyssey.ca/docker-compose.yml
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ services:
MYSQL_USER: ubyssey
MYSQL_PASSWORD: ${SQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${SQL_PASSWORD}
ports:
- 3306:3306
volumes:
- ./mysql-data:/var/lib/mysql
healthcheck:
Expand All @@ -18,7 +20,7 @@ services:
retries: 20

django:
image: ghcr.io/ubyssey/ubyssey.ca:staging-deploy
image: ghcr.io/ubyssey/ubyssey.ca:${TAG}
command: >
bash -c "python manage.py migrate
&& gunicorn ubyssey.wsgi:application --bind 0.0.0.0:8000"
Expand Down

0 comments on commit 9800ec1

Please sign in to comment.