Skip to content

Commit

Permalink
Improve documentation for manual deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
dandinu committed Aug 15, 2023
1 parent 71419bd commit 4500f6c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions docs/4-deployto-azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@ The following steps describes how ChatGPT on Azure solution accelerator can be d

Fork this repository to your own organisation so that you can execute GitHub Actions against your own Azure Subscription.

1. Clone the `.env.local` file and name it `.env.production` to store the production environment variables. Modify the `NEXTAUTH_URL` variable with your azure App Service URL:

```
NEXTAUTH_URL=https://<APP NAME>.azurewebsites.net
```

# Check environment variables on Azure too
You need to make sure that the environment variables from your `env.production` file are set there, too. If you don't, then your app on Azure won't be able to authenticate with GitHub/AD correctly.

On Azure App Service -

Open the Azure portal
Navigate to your `app service`
Open the settings menu and select `Configuration`
In the `Application settings` tab, add new entries for `AUTH_GITHUB_ID` and `AUTH_GITHUB_SECRET` or any other environment variables you are missing, under App settings, and save the changes
Remember to keep these variables secure - they provide access to your GitHub/AD app and should not be disclosed publicly.

# 🗝️ Configure secrets in your GitHub repository

### 1. AZURE_CREDENTIALS
Expand Down Expand Up @@ -37,8 +54,6 @@ Once the secrets are configured, the GitHub Actions will be triggered for every

![](/images/runworkflow.png)

[Next](/docs/5-add-Identity.md)

# Deploy the app manually (Without Github Actions).

Do an npm install and npm run build like so:
Expand Down Expand Up @@ -77,4 +92,6 @@ curl -X POST \
-H "Authorization: Bearer <access_token>" \
"https://<app_name>.scm.azurewebsites.net/api/zipdeploy"
```
That's it!

[Next](/docs/5-add-Identity.md)

Binary file added images/app-services-variables.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4500f6c

Please sign in to comment.