diff --git a/docs/4-deployto-azure.md b/docs/4-deployto-azure.md index f65ea08..382b567 100644 --- a/docs/4-deployto-azure.md +++ b/docs/4-deployto-azure.md @@ -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://.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 @@ -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: @@ -77,4 +92,6 @@ curl -X POST \ -H "Authorization: Bearer " \ "https://.scm.azurewebsites.net/api/zipdeploy" ``` -That's it! \ No newline at end of file + +[Next](/docs/5-add-Identity.md) + diff --git a/images/app-services-variables.png b/images/app-services-variables.png new file mode 100644 index 0000000..4854794 Binary files /dev/null and b/images/app-services-variables.png differ