Pamela Fox
commited on
Update README.md with init
Browse files
README.md
CHANGED
@@ -86,21 +86,37 @@ The same tests are also run as a Github action.
|
|
86 |
|
87 |
## Deployment
|
88 |
|
89 |
-
This repository is set up for deployment on Azure App Service (w/
|
90 |
|
91 |
-
1. Sign up for a [free Azure account](https://azure.microsoft.com/free
|
92 |
-
2. Install the [Azure
|
93 |
-
3.
|
94 |
|
95 |
-
```
|
96 |
-
azd
|
97 |
-
```
|
98 |
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
### CI/CD pipeline
|
106 |
|
|
|
86 |
|
87 |
## Deployment
|
88 |
|
89 |
+
This repository is set up for deployment on Azure App Service (w/PostgreSQL flexible server) using the configuration files in the `infra` folder.
|
90 |
|
91 |
+
1. Sign up for a [free Azure account](https://azure.microsoft.com/free/)
|
92 |
+
2. Install the [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd). (If you open this repository in Codespaces or with the VS Code Dev Containers extension, that part will be done for you.)
|
93 |
+
3. Initialize a new `azd` environment:
|
94 |
|
95 |
+
```shell
|
96 |
+
azd init
|
97 |
+
```
|
98 |
|
99 |
+
It will prompt you to provide a name (like "django-app") that will later be used in the name of the deployed resources.
|
100 |
|
101 |
+
4. Provision and deploy all the resources:
|
102 |
+
|
103 |
+
```shell
|
104 |
+
azd up
|
105 |
+
```
|
106 |
+
|
107 |
+
It will prompt you to login, pick a subscription, and provide a location (like "eastus"). Then it will provision the resources in your account and deploy the latest code. If you get an error with deployment, changing the location (like to "centralus") can help, as there may be availability constraints for some of the resources.
|
108 |
+
|
109 |
+
5. To be able to access `/admin`, you'll need a Django superuser. Navigate to the Azure Portal for the App Service, select SSH, and run this command:
|
110 |
+
|
111 |
+
```
|
112 |
+
python manage.py createsuperuser
|
113 |
+
```
|
114 |
+
|
115 |
+
6. When you've made any changes to the app code, you can just run:
|
116 |
+
|
117 |
+
```shell
|
118 |
+
azd deploy
|
119 |
+
```
|
120 |
|
121 |
### CI/CD pipeline
|
122 |
|