Azure-Samples / djangoapp

The polls app from the official Django tutorial, that demonstrates how to build data-driven Python apps in Azure App Service.
MIT License
56 stars 426 forks source link

Switch to Using WEBSITE_HOSTNAME Doesn't Align With Microsoft Docs Deploy a Django app Guide #19

Closed corykroll closed 3 years ago

corykroll commented 3 years ago

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

With the adjustment of removing DJANGO_ENV in favor of WEBSITE_HOSTNAME in pull request #18, documentation shown on Microsoft Docs may no longer be correct as it still notes to configure a DJANGO_ENV variable in settings: https://docs.microsoft.com/en-us/azure/postgresql/flexible-server/tutorial-django-app-service-postgres?tabs=clone

Any log messages given by the failure

Expected/desired behavior

In the Docs, the following command is to be issued in the Azure CLI: az webapp config appsettings set --settings DJANGO_ENV="production" DBHOST=".postgres.database.azure.com" DBNAME="postgres" DBUSER="" DBPASS="" This command, however, sets DJANGO_ENV and makes no mention of setting WEBSITE_HOSTNAME

OS and Version?

Any OS

Versions

Mention any other details that might be useful

I'm new to setting up Python/Django into Azure Web Apps, so my apologies if I'm missing something. I'm not sure te exact changes/commands necessary to swap out this configuration change.

corykroll commented 3 years ago

Per https://docs.microsoft.com/en-us/azure/app-service/configure-language-python, "App Service automatically defines an environment variable named WEBSITE_HOSTNAME". Becasue of this I am closing this issue. This issue can be deleted.