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"