A copy of the slides from my Django on Azure PyCon US 2021 workshop is available in this repository.
azd init --template https://github.com/tonybaloney/django-on-azure
This command will clone the code to your current folder and prompt you for the following information:
Environment Name
: This will be used as a prefix for the resource group that will be created to hold all Azure resources. This name should be unique within your Azure subscription.azd up
This command will prompt you for the following information:
Azure Location
: The Azure location where your resources will be deployed.Azure Subscription
: The Azure Subscription where your resources will be deployed.NOTE: This may take a while to complete as it executes three commands:
azd package
(builds a deployable copy of your application),azd provision
(provisions Azure resources), andazd deploy
(deploys application code). You will see a progress indicator as it packages, provisions and deploys your application.
Checkout the Azure Dev CLI documentation for more instructions on using the CLI.
startup.sh
scriptgunicorn --workers 8 --threads 4 --timeout 60 --access-logfile '-' --error-logfile '-' --bind=0.0.0.0:8000 -k uvicorn.workers.UvicornWorker --chdir=/home/site/wwwroot your_django_app.asgi
uvicorn
to the requirements.txt
file