From 9800ec16ced4c958afd0aa96ef8cc8ae3ae4f5c5 Mon Sep 17 00:00:00 2001 From: Peter Siemens Date: Tue, 7 Jan 2025 19:17:40 -0800 Subject: [PATCH] Set tag in docker-compose.yml --- .github/workflows/deploy-staging.yml | 5 ++--- docker-compose.yml | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 9185d1115..51f515db1 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index dbd100600..6732461ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: @@ -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"