Skip to content

Commit

Permalink
Update fastapi-htmx-azd-template README (#4)
Browse files Browse the repository at this point in the history
* break azd up into init and up

* Update README.md

correct spelling mistakes

---------

Co-authored-by: zedy <[email protected]>
  • Loading branch information
zedy-wj and zedy committed May 9, 2023
1 parent b5dc2a7 commit a400b46
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,29 @@ The following prerequisites are required to use this application. Please ensure
The fastest way for you to get this application up and running on Azure is to use the `azd up` command. This single command will create and configure all necessary Azure resources - including access policies and roles for your account and service-to-service communication with Managed Identities.

1. Open a terminal, create a new empty folder, and change into it.
1. Create a new [Python virtual environment](https://docs.python.org/3/library/venv.html).
1. Run the following command to initialize the project, provision Azure resources, and deploy the application code.
2. Create a new [Python virtual environment](https://docs.python.org/3/library/venv.html).
3. Run the following command to initialize the project.

```bash
azd up --template atrakic/fastapi-htmx-azd-template
azd init --template atrakic/fastapi-htmx-azd-template
```

You will be prompted for the following information:
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.

4. Run the following command to package a deployable copy of your application, provision the template's infrastructure to Azure and also deploy the application code to those newly provisioned resources.

```bash
azd up
```

This command will 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.
- `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 init` (initializes environment), `azd provision` (provisions Azure resources), and `azd deploy` (deploys application code). You will see a progress indicator as it provisions and deploys your application.
> NOTE: This may take a while to complete as it executes three commands: `azd package` (packages a deployable copy of your application), `azd provision` (provisions Azure resources), and `azd deploy` (deploys application code). You will see a progress indicator as it packages, provisions and deploys your application.
When `azd up` is complete it will output the following URLs:

Expand All @@ -46,7 +54,7 @@ Click the web application URL to launch the ToDo app. Create a new collection an
> NOTE:
>
> - The `azd up` command will create Azure resources that will incur costs to your Azure subscription. You can clean up those resources manually via the Azure portal or with the `azd down` command.
> - You can call `azd up` as many times as you like to both provision and deploy your solution, but you only need to provide the `--template` parameter the first time you call it to get the code locally. Subsequent `azd up` calls do not require the template parameter. If you do provide the parameter, all your local source code will be overwritten if you agree to overwrite when prompted.
> - You can call `azd up` as many times as you like to both provision and deploy your solution.
> - You can always create a new environment with `azd env new`.
### Application Architecture
Expand Down

0 comments on commit a400b46

Please sign in to comment.