diff --git a/.env b/.env index 520cda3..d440d3e 100644 --- a/.env +++ b/.env @@ -4,6 +4,8 @@ POSTGRES_DB=sahana POSTGRES_HOST=sahana-postgres SAHANA_HMAC_KEY=akeytochange +SAHANA_ADMIN_USER=admin +SAHANA_ADMIN_PASSWORD=sahana SAHANA_MAIL_HOST=127.0.0.1:25 SAHANA_MAIL_SENDER="'Sahana' " @@ -12,5 +14,4 @@ SAHANA_MAIL_APPROVER=useradmin@example.org SAHANA_API_KEY_GOOGLE= SAHANA_API_KEY_OPENWEATHERMAP= -SAHANA_ADMIN_USER=admin -SAHANA_ADMIN_PASSWORD=sahana +SAHANA_PUBLIC_URL=http://127.0.0.1:8080 diff --git a/sahana/image.d/etc/sudoers.d/sahana b/sahana/image.d/etc/sudoers.d/sahana index 90c2d62..0a6389d 100644 --- a/sahana/image.d/etc/sudoers.d/sahana +++ b/sahana/image.d/etc/sudoers.d/sahana @@ -8,5 +8,6 @@ Defaults env_keep += "SAHANA_MAIL_SENDER" Defaults env_keep += "SAHANA_MAIL_APPROVER" Defaults env_keep += "SAHANA_API_KEY_GOOGLE" Defaults env_keep += "SAHANA_API_KEY_OPENWEATHERMAP" +Defaults env_keep += "SAHANA_PUBLIC_URL" sahana ALL=(ALL) NOPASSWD:ALL diff --git a/sahana/image.d/srv/web2py/applications/eden/models/000_config.py b/sahana/image.d/srv/web2py/applications/eden/models/000_config.py index 46c95c7..108439e 100644 --- a/sahana/image.d/srv/web2py/applications/eden/models/000_config.py +++ b/sahana/image.d/srv/web2py/applications/eden/models/000_config.py @@ -52,7 +52,7 @@ settings.gis.spatialdb = True #settings.base.system_name = T("Sahana Eden Humanitarian Management Platform") #settings.base.system_name_short = T("Sahana Eden") # 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 # (need to set to "True" again when Table definitions are changed)