Skip to content

Commit 1bacdea

Browse files
authored
Update README.md with init
1 parent e529c16 commit 1bacdea

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ which makes it easier to develop apps locally, deploy them to Azure, and monitor
2323

2424
### Local development
2525

26-
This project has devcontainer support, so you can open it in Github Codespaces or local VS Code with the Dev Containers extension.
26+
This project has Dev Container support, so you can open it in Github Codespaces or local VS Code with the Dev Containers extension.
2727

2828
🎥 [Watch a screencast of running the app in Github Codespaces.](https://www.youtube.com/watch?v=r6Hnp9RXUpY)
2929

3030
Steps for running the server:
3131

32-
1. (Optional) If you're unable to open the devcontainer, [create a Python virtual environment](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments) and activate that.
32+
1. (Optional) If you're unable to open the Dev Container, [create a Python virtual environment](https://docs.python.org/3/tutorial/venv.html#creating-virtual-environments) and activate that.
3333

3434
2. Install the requirements:
3535

3636
```shell
3737
python3 -m pip install -r requirements.txt
3838
```
3939

40-
3. Create an `.env` file using `.env.sample` as a guide. Set the value of `DBNAME` to the name of an existing database in your local PostgreSQL instance. Set the values of `DBHOST`, `DBUSER`, and `DBPASS` as appropriate for your local PostgreSQL instance. If you're in the devcontainer, copy the values from `.env.sample.devcontainer`.
40+
3. Create an `.env` file using `.env.sample` as a guide. Set the value of `DBNAME` to the name of an existing database in your local PostgreSQL instance. Set the values of `DBHOST`, `DBUSER`, and `DBPASS` as appropriate for your local PostgreSQL instance. If you're in the Dev Container, copy the values from `.env.sample.devcontainer`.
4141

4242
4. In the `.env` file, fill in a secret value for `SECRET_KEY`. You can use this command to generate an appropriate value:
4343

@@ -66,20 +66,28 @@ This repo is set up for deployment on Azure App Service (w/PostGreSQL server) us
6666
Steps for deployment:
6767
6868
1. Sign up for a [free Azure account](https://azure.microsoft.com/free/)
69-
2. Install the [Azure Dev CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd). (If you opened this repository in a devcontainer, that part will be done for you.)
70-
3. Provision and deploy all the resources:
69+
2. Install the [Azure Dev CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd). (If you opened this repository in a Dev Container, that part will be done for you.)
70+
3. Initialize a new `azd` environment:
71+
72+
```shell
73+
azd init
74+
```
75+
76+
It will prompt you to provide a name (like "flask-app") that will later be used in the name of the deployed resources.
77+
78+
4. Provision and deploy all the resources:
7179
7280
```shell
7381
azd up
7482
```
7583
76-
It will prompt you to login and to provide a name (like "flask-app") and 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 are availability constraints for some of the resources.
84+
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.
7785
78-
4. When `azd` has finished deploying, you'll see an endpoint URI in the command output. Visit that URI, and you should see the front page of the restaurant review app! 🎉 If you see an error, open the Azure Portal from the URL in the command output, navigate to the App Service, select Logstream, and check the logs for any errors.
86+
5. When `azd` has finished deploying, you'll see an endpoint URI in the command output. Visit that URI, and you should see the front page of the restaurant review app! 🎉 If you see an error, open the Azure Portal from the URL in the command output, navigate to the App Service, select Logstream, and check the logs for any errors.
7987
8088
![Screenshot of Flask restaurants website](screenshot_website.png)
8189
82-
5. When you've made any changes to the app code, you can just run:
90+
6. When you've made any changes to the app code, you can just run:
8391
8492
```shell
8593
azd deploy

0 commit comments

Comments
 (0)