Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DON'T MERGE: Updates env vars Django template; tweaks to New Relic config #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion roles/newrelic/templates/gunicorn_start.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

# New Relic environment vars
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME="{{ project_name }} (Dev)"
NEW_RELIC_PROCESS_HOST_DISPLAY_NAME="{{ project_name }}-Sandbox"
NEW_RELIC_CONFIG_FILE={{ virtualenv_path }}/etc/newrelic.ini
NEW_RELIC_ENVIRONMENT=development
export NEW_RELIC_PROCESS_HOST_DISPLAY_NAME
export NEW_RELIC_CONFIG_FILE
export NEW_RELIC_ENVIRONMENT

# Programs meant to be run under supervisor should not daemonize themselves
# (do not use --daemon).
Expand Down
4 changes: 2 additions & 2 deletions roles/newrelic/templates/newrelic.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ thread_profiler.enabled = true
#

[newrelic:development]
app_name = {{ project_name }} (Dev)
monitor_mode = false
app_name = {{ project_name }}-Sandbox
monitor_mode = true
transaction_tracer.record_sql = {{ new_relic_sql_mode }}

[newrelic:test]
Expand Down
17 changes: 17 additions & 0 deletions roles/web/templates/environment_variables-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"_comment": "Note that WE_VOTE_SERVER_ROOT_URL should end without slash",
"WE_VOTE_SERVER_ROOT_URL": "https://api.wevoteusa.org",
"WEB_APP_ROOT_URL": "https://WeVote.US",
"TIME_ZONE": "US/Pacific",
"SERVER_IN_DEBUG_MODE": true,

"_comment": "local.py settings, including database",
Expand All @@ -12,6 +13,22 @@
"DATABASE_HOST": "",
"DATABASE_PORT": "",

"_comment": "read-only database settings for local.py",
"DATABASE_ENGINE_READONLY": "django.db.backends.postgresql_psycopg2",
"DATABASE_NAME_READONLY": "WeVoteServerDB",
"DATABASE_USER_READONLY": "postgres",
"DATABASE_PASSWORD_READONLY": "",
"DATABASE_HOST_READONLY": "",
"DATABASE_PORT_READONLY": "",

"_comment": "analytics database settings for local.py",
"DATABASE_ENGINE_ANALYTICS": "django.db.backends.postgresql_psycopg2",
"DATABASE_NAME_ANALYTICS": "WeVoteServerDB",
"DATABASE_USER_ANALYTICS": "postgres",
"DATABASE_PASSWORD_ANALYTICS": "",
"DATABASE_HOST_ANALYTICS": "",
"DATABASE_PORT_ANALYTICS": "",

"_comment": "The connection string for Elastic Search database",
"ELASTIC_SEARCH_CONNECTION_STRING": "",

Expand Down