This project will walkthrough the steps to deploy a Django application to Azure Container Apps. The Django application is a simple web application for a space travel agency. The application is built using the Django web framework and uses a PostgreSQL database. The application can be deployed to Azure using Azure Developer CLI. With the command azd up
.
You'll need a GitHub account. If you don't have a GitHub account, create a free account
If you're using VS Code we recommend that you develop in a dev container. This will ensure that you have all the tools you need to build and run the application. You will need docker installed and running. To learn more about dev containers, see Developing inside a Container.
You can deploy your application from your cloned repo using Azure Developer CLI.
- Open a terminal, create a new empty folder, and change into it.
- Initialize your project using the following command:
azd init --template azure-django-postgres-aca
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.
- Provision and deploy your project with the following command
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.
Check out the resources to Learn more about: