From d15fa4095c8fd0a004f4744e0a1eb2cf39e04492 Mon Sep 17 00:00:00 2001 From: Thea Hvalen Thodesen Date: Thu, 11 Apr 2024 10:42:56 +0200 Subject: [PATCH 1/3] KURSP-1162: Tag docker image with git hash and latest --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2080f60..7bb18a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,7 +82,7 @@ jobs: run: | if [ "$GITHUB_REF" = "refs/heads/staging" ] then - docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api-staging + docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api-staging:$GITHUB_SHA -t $AZURE_CONTAINER_REGISTRY/statistics-api-staging:latest az webapp config appsettings set --subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }} -g $AZURE_RESOURCE_GROUP -n $AZURE_APP_NAME --slot staging --settings \ "CANVAS_ACCESS_KEY=${{ secrets.CANVAS_ACCESS_KEY }}" \ "DB_PASSWORD=${{ secrets.STAGING_DB_PASSWORD }}" \ @@ -97,7 +97,7 @@ jobs: docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging elif [ "$GITHUB_REF" = "refs/heads/master" ] then - docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api + docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api:$GITHUB_SHA -t $AZURE_CONTAINER_REGISTRY/statistics-api:latest az webapp config appsettings set --subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }} -g $AZURE_RESOURCE_GROUP -n $AZURE_APP_NAME --settings \ "CANVAS_ACCESS_KEY=${{ secrets.CANVAS_ACCESS_KEY }}" \ "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" \ From 6b3204307b584f01a1b61ba01efcd6852f29eda3 Mon Sep 17 00:00:00 2001 From: Thea Hvalen Thodesen Date: Thu, 11 Apr 2024 10:50:00 +0200 Subject: [PATCH 2/3] KURSP-1162: Tag docker image with git hash and latest --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7bb18a3..664f45a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -94,7 +94,8 @@ jobs: "DOCKER_REGISTRY_SERVER_URL=https://$AZURE_CONTAINER_REGISTRY" \ "GIT_COMMIT=${GITHUB_SHA}" \ @"${GITHUB_WORKSPACE}/.github/app_service_config/staging_app_service_config.json" - docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging + docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging:$GITHUB_SHA + docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging:latest elif [ "$GITHUB_REF" = "refs/heads/master" ] then docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api:$GITHUB_SHA -t $AZURE_CONTAINER_REGISTRY/statistics-api:latest @@ -109,5 +110,6 @@ jobs: "DOCKER_REGISTRY_SERVER_URL=https://$AZURE_CONTAINER_REGISTRY" \ "GIT_COMMIT=${GITHUB_SHA}" \ @"${GITHUB_WORKSPACE}/.github/app_service_config/app_service_config.json" - docker push $AZURE_CONTAINER_REGISTRY/statistics-api + docker push $AZURE_CONTAINER_REGISTRY/statistics-api:$GITHUB_SHA + docker push $AZURE_CONTAINER_REGISTRY/statistics-api:latest fi From cda065528d25b0ae73f73f3043e96ea6ce74be89 Mon Sep 17 00:00:00 2001 From: Thea Hvalen Thodesen Date: Thu, 18 Apr 2024 12:53:50 +0200 Subject: [PATCH 3/3] KURSP-966: Update gunicorn --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 42f66dd..0f6e164 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ requests==2.31.0 SQLAlchemy-Utils==0.41.1 APScheduler==3.10.4 django~=3.2 -gunicorn~=21.2.0 +gunicorn~=22.0.0 mysqlclient==2.1.1 arrow~=1.3.0 python-graphql-client~=0.4.3