From 2a1b6e42a8ac05db0aa793f0f8f2abd2102b6078 Mon Sep 17 00:00:00 2001 From: Tobias Genannt Date: Tue, 6 Mar 2018 13:36:09 +0100 Subject: [PATCH] Externalize gunicorn-config This moves the gunicorn_config.py into /etc/netbox so that it can be easily mapped through a Openshift config map --- Dockerfile | 4 ++-- {docker => configuration}/gunicorn_config.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) rename {docker => configuration}/gunicorn_config.py (88%) diff --git a/Dockerfile b/Dockerfile index 289d7bb..4ea4872 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ WORKDIR /opt/netbox RUN pip install -r requirements.txt COPY docker/configuration.docker.py /opt/netbox/netbox/netbox/configuration.py -COPY docker/gunicorn_config.py /opt/netbox/ +COPY configuration/gunicorn_config.py /etc/netbox/ COPY docker/nginx.conf /etc/netbox-nginx/nginx.conf COPY docker/docker-entrypoint.sh docker-entrypoint.sh COPY startup_scripts/ /opt/netbox/startup_scripts/ @@ -46,6 +46,6 @@ ENTRYPOINT [ "/opt/netbox/docker-entrypoint.sh" ] VOLUME ["/etc/netbox-nginx/"] -CMD ["gunicorn", "--log-level debug", "-c /opt/netbox/gunicorn_config.py", "netbox.wsgi"] +CMD ["gunicorn", "-c /etc/netbox/gunicorn_config.py", "netbox.wsgi"] LABEL SRC_URL="$URL" diff --git a/docker/gunicorn_config.py b/configuration/gunicorn_config.py similarity index 88% rename from docker/gunicorn_config.py rename to configuration/gunicorn_config.py index 059e394..063d822 100644 --- a/docker/gunicorn_config.py +++ b/configuration/gunicorn_config.py @@ -5,3 +5,4 @@ workers = 3 errorlog = '-' accesslog = '-' capture_output = False +loglevel = 'debug'