diff --git a/.env b/.env index 1eae3038..7193c3bc 100644 --- a/.env +++ b/.env @@ -68,4 +68,12 @@ CKAN___CELERY_RESULT_BACKEND=redis CKAN___REDIS_HOST=redis CKAN___REDIS_PORT=6379 CKAN___REDIS_DB=0 -CKAN___REDIS_CONNECT_RETRY=True \ No newline at end of file +CKAN___REDIS_CONNECT_RETRY=True + +# New Relic +NEW_RELIC_LICENSE_KEY= +NEW_RELIC_APP_NAME=catalog-next +NEW_RELIC_MONITOR_MODE=false +NEW_RELIC_LOG=/var/log/new_relic.log +NEW_RELIC_LOG_LEVEL=info +NEW_RELIC_HOST=gov-collector.newrelic.com diff --git a/ckan/Dockerfile b/ckan/Dockerfile index 1b912a98..5a982679 100644 --- a/ckan/Dockerfile +++ b/ckan/Dockerfile @@ -24,4 +24,5 @@ RUN pip install poetry==1.0.10 COPY freeze-requirements.sh /usr/local/bin COPY docker-entrypoint.d/* /docker-entrypoint.d/ - \ No newline at end of file +# Not currently in use in development +COPY setup/server_start.sh ${APP_DIR}/ \ No newline at end of file diff --git a/ckan/setup/server_start.sh b/ckan/setup/server_start.sh new file mode 100755 index 00000000..15388b28 --- /dev/null +++ b/ckan/setup/server_start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +DIR="$(dirname "${BASH_SOURCE[0]}")" + +if test -f "$DIR/.env"; then + set -o allexport; source $DIR/.env; set +o allexport +fi + +# Run web application +newrelic-admin run-program gunicorn --worker-class gevent --paste $CKAN_INI "$@"