Set public URL via .env

This commit is contained in:
Disassembler 2022-03-06 20:58:08 +01:00
parent afa74d470f
commit ee7b5fddc7
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
3 changed files with 5 additions and 3 deletions

5
.env
View File

@ -4,6 +4,8 @@ POSTGRES_DB=sahana
POSTGRES_HOST=sahana-postgres POSTGRES_HOST=sahana-postgres
SAHANA_HMAC_KEY=akeytochange SAHANA_HMAC_KEY=akeytochange
SAHANA_ADMIN_USER=admin
SAHANA_ADMIN_PASSWORD=sahana
SAHANA_MAIL_HOST=127.0.0.1:25 SAHANA_MAIL_HOST=127.0.0.1:25
SAHANA_MAIL_SENDER="'Sahana' <sahana@example.org>" SAHANA_MAIL_SENDER="'Sahana' <sahana@example.org>"
@ -12,5 +14,4 @@ SAHANA_MAIL_APPROVER=useradmin@example.org
SAHANA_API_KEY_GOOGLE= SAHANA_API_KEY_GOOGLE=
SAHANA_API_KEY_OPENWEATHERMAP= SAHANA_API_KEY_OPENWEATHERMAP=
SAHANA_ADMIN_USER=admin SAHANA_PUBLIC_URL=http://127.0.0.1:8080
SAHANA_ADMIN_PASSWORD=sahana

View File

@ -8,5 +8,6 @@ Defaults env_keep += "SAHANA_MAIL_SENDER"
Defaults env_keep += "SAHANA_MAIL_APPROVER" Defaults env_keep += "SAHANA_MAIL_APPROVER"
Defaults env_keep += "SAHANA_API_KEY_GOOGLE" Defaults env_keep += "SAHANA_API_KEY_GOOGLE"
Defaults env_keep += "SAHANA_API_KEY_OPENWEATHERMAP" Defaults env_keep += "SAHANA_API_KEY_OPENWEATHERMAP"
Defaults env_keep += "SAHANA_PUBLIC_URL"
sahana ALL=(ALL) NOPASSWD:ALL sahana ALL=(ALL) NOPASSWD:ALL

View File

@ -52,7 +52,7 @@ settings.gis.spatialdb = True
#settings.base.system_name = T("Sahana Eden Humanitarian Management Platform") #settings.base.system_name = T("Sahana Eden Humanitarian Management Platform")
#settings.base.system_name_short = T("Sahana Eden") #settings.base.system_name_short = T("Sahana Eden")
# Set this to the Public URL of the instance # Set this to the Public URL of the instance
#settings.base.public_url = "http://127.0.0.1:8000" settings.base.public_url = os.getenv("SAHANA_PUBLIC_URL", "http://127.0.0.1:8080")
# Switch to "False" in Production for a Performance gain # Switch to "False" in Production for a Performance gain
# (need to set to "True" again when Table definitions are changed) # (need to set to "True" again when Table definitions are changed)