зеркало из https://github.com/mozilla/treeherder.git
Bug 1212822 - Only load local.py in the Vagrant environment
Ideally we'd remove local.py entirely, in favour of environment variables. However at least for now, it's still needed for setting the logging preferences/enabling debugging apps for the Vagrant environment. As such, it's being kept but disabled everywhere other than for local development. The stage/prod local.py files have been vetted, and (a) the contents confirmed to match that in the environment, and (b) all affected settings in base.py checked to ensure they read the correct environment variable. Heroku doesn't have a local.py. As such, this should be a no-op other than locally, where a Vagrant provision will be required.
This commit is contained in:
Родитель
19d3570a1e
Коммит
d9bd20efd1
|
@ -30,6 +30,7 @@ line {"etc-hosts":
|
|||
|
||||
file {"/etc/profile.d/treeherder.sh":
|
||||
content => "
|
||||
export ENABLE_LOCAL_SETTINGS_FILE='True'
|
||||
export DATABASE_URL='mysql://${DB_USER}:${DB_PASS}@localhost/treeherder'
|
||||
export DATABASE_URL_RO='mysql://${DB_USER}:${DB_PASS}@localhost/treeherder'
|
||||
export TREEHERDER_DEBUG='1'
|
||||
|
|
|
@ -9,7 +9,6 @@ from kombu import (Exchange,
|
|||
|
||||
from treeherder import path
|
||||
|
||||
# These settings can all be optionally set via env vars, or in local.py:
|
||||
env = environ.Env()
|
||||
|
||||
TREEHERDER_MEMCACHED = os.environ.get("TREEHERDER_MEMCACHED", "127.0.0.1:11211")
|
||||
|
@ -386,12 +385,14 @@ PULSE_DATA_INGESTION_QUEUES_DURABLE = env("PULSE_DATA_INGESTION_QUEUES_DURABLE",
|
|||
PULSE_DATA_INGESTION_QUEUES_AUTO_DELETE = env("PULSE_DATA_INGESTION_QUEUES_AUTO_DELETE",
|
||||
default=False)
|
||||
|
||||
# Note: All the configs below this import will take precedence over what is
|
||||
# defined in local.py!
|
||||
try:
|
||||
from .local import *
|
||||
except ImportError:
|
||||
pass
|
||||
# The git-ignored local.py settings file should only be used for local development.
|
||||
if env.bool("ENABLE_LOCAL_SETTINGS_FILE", default=False):
|
||||
# Note: All the configs below this import will take precedence over what is
|
||||
# defined in local.py!
|
||||
try:
|
||||
from .local import *
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
INSTALLED_APPS += LOCAL_APPS
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче