Closed Kirchen99 closed 1 year ago
@Kirchen99, it's fairly simple to deploy the app manually.
Do an npm install
and npm run build
like so:
cd ./src
npm install
npm run build --if-present
cd ..
Copy standalone into the root
cp -R ./src/.next/standalone ./site-deploy
Copy static into the .next folder
cp -R ./src/.next/static ./site-deploy/.next/static
Copy Public folder
cp -R ./src/public ./site-deploy/public
Create a zip of your Next application
cd ./site-deploy
zip Nextjs-site.zip ./* .next -qr
Deploy to a Web App via REST API cURL command or using Azure CLI
az webapp deployment source config-zip -g <resource_group> -n \
<app_name> --src Nextjs-site.zip
or
curl -X POST \
--data-binary "@Nextjs-site.zip" \
-H "Authorization: Bearer <access_token>" \
"https://<app_name>.scm.azurewebsites.net/api/zipdeploy"
Hope this helps.
Thank you for the quick response!
After successfully deploying my application to Azure, I encountered the following error:
AADSTS50011: The redirect URI 'https://<app_name>.azurewebsites.net/.auth/login/aad/callback' specified in the request does not match the redirect URIs configured for the application
And I checked my "Redirect URI" in the "App registrations":
before:
https://<app_name>.azurewebsites.net/api/auth/callback/azure-ad
after:
https://<app_name>.azurewebsites.net/.auth/login/aad/callback
With this adjustment, I attempted to log in again at https://
I also testet it locally and it worked on my localhost, the Redirect URI is
http://localhost:3000/api/auth/callback/azure-ad
I have no idea why my Redirect URI in Azure ends with .auth/login/aad/callback
. Maybe this is the problem?
I ran into this problem because I added an identity provider to the Authentication option of the Azure App. After I removed the identity provider, it works. Thanks again for the help.
@oliverlabs in your instructions to deploy manually why is the last step using "az functionapp deployment" instead of "az webapp deployment"?
@jupiter19914, you are correct. It should be az webapp
. I will fix the command above.
I've noticed that the current documentation focuses solely on deploying ChatGPT to Azure using GitHub Actions. While GitHub Actions is a powerful tool, some users may prefer different deployment methods or may not have access to GitHub for various reasons.
I kindly request that you consider creating documentation that outlines alternative methods for deploying ChatGPT to Azure without relying on GitHub Actions. This would provide more flexibility and accessibility to a wider audience of users who may have different workflows or preferences.