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 00000000..7169a777 Binary files /dev/null and b/env_secrets/production_azure.env differ