From 64d4762953e7a5982ff94d195c1fd935ef4f5191 Mon Sep 17 00:00:00 2001 From: Lorenz Padberg Date: Thu, 4 May 2023 14:14:14 +0200 Subject: [PATCH] Switch guincorn port --- .azure/config | 7 +++++++ compose/django/docker_start.sh | 2 +- env/azure/azure-infos.md | 6 ++++++ env/azure/commands.sh | 5 +++++ env_secrets/production_azure.env | Bin 0 -> 139 bytes 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .azure/config create mode 100644 env_secrets/production_azure.env diff --git a/.azure/config b/.azure/config new file mode 100644 index 00000000..2204489e --- /dev/null +++ b/.azure/config @@ -0,0 +1,7 @@ +[defaults] +group = vbv-prod_group +sku = P2v2 +appserviceplan = prod +location = switzerlandnorth +web = vbv-prod + diff --git a/compose/django/docker_start.sh b/compose/django/docker_start.sh index ea492112..16637c5b 100644 --- a/compose/django/docker_start.sh +++ b/compose/django/docker_start.sh @@ -9,4 +9,4 @@ python /app/manage.py collectstatic --no-input --no-post-process # TODO remove after stabilisation python /app/manage.py reset_schema -/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:80 --chdir=/app -k uvicorn.workers.UvicornWorker +/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:7555 --chdir=/app -k uvicorn.workers.UvicornWorker diff --git a/env/azure/azure-infos.md b/env/azure/azure-infos.md index d26cc489..bab329ba 100644 --- a/env/azure/azure-infos.md +++ b/env/azure/azure-infos.md @@ -19,3 +19,9 @@ Deployment for django: https://tonybaloney.github.io/posts/django-on-azure-beyond-hello-world.html az webapp deployment user set --user-name --password + +# Docker image for the app + + To be able to pull the docker image from dockerhub you need to create an access token on dockerhub. +the access token is then the password in azure and the username is the dockerhub username. + diff --git a/env/azure/commands.sh b/env/azure/commands.sh index 64e5d7e2..6e679b0f 100644 --- a/env/azure/commands.sh +++ b/env/azure/commands.sh @@ -9,3 +9,8 @@ az appservice plan create --name prod --resource-group VBV --sku P2V2 --is-linux # create the two applications on Python 3.10, change az webapp create --resource-group VBV --plan stage --name app-stage --runtime "PYTHON|3.10" --deployment-local-git az webapp create --resource-group VBV --plan prod --name app-prod --runtime "PYTHON|3.10" --deployment-local-git + + +az webapp up --resource-group VBV --plan prod --name app-prod --runtime "PYTHON|3.10" --logs + + diff --git a/env_secrets/production_azure.env b/env_secrets/production_azure.env new file mode 100644 index 0000000000000000000000000000000000000000..7169a777e3376e577b46175a64778a5d42ed30cb GIT binary patch literal 139 zcmV;60CfKVM@dveQdv+`09LRFs0X_av5?+RBV)#sB-P>7UNF-)jxAz8oSj&44ATw5 zlivayYOLdm>6Q9?WClt?>gHPV&h$_p58}$xl{&ZROA383LO!xT%VrS?uG|}PU|b