From 1072d243a312a0b15e7b7bc01451b258d75d59dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Mon, 19 Jun 2017 09:24:13 +0200 Subject: [PATCH 1/2] Fixes logging config that prevented gunicon launch --- Dockerfile | 2 +- docker-compose.yml | 2 +- docker/docker-entrypoint.sh | 2 +- docker/gunicorn_config.py | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 48b8fca..183e306 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ WORKDIR /opt ARG BRANCH=v2.0-beta3 ARG URL=https://github.com/digitalocean/netbox/archive/$BRANCH.tar.gz RUN wget -q -O - "${URL}" | tar xz \ - && ln -s netbox* netbox + && mv netbox* netbox WORKDIR /opt/netbox RUN pip install -r requirements.txt diff --git a/docker-compose.yml b/docker-compose.yml index 5c119b2..df7859b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: context: . args: - BRANCH=${BRANCH-master} - image: digitalocean/netbox:${BRANCH-master} + image: ninech/netbox:${BRANCH-master} depends_on: - postgres env_file: netbox.env diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 8f1bd3f..e65c648 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -24,4 +24,4 @@ END /opt/netbox/netbox/manage.py collectstatic --no-input # start unicorn -gunicorn --log-level debug --debug --error-logfile /dev/stderr --log-file /dev/stdout -c /opt/netbox/gunicorn_config.py netbox.wsgi +gunicorn --log-level debug --debug -c /opt/netbox/gunicorn_config.py netbox.wsgi diff --git a/docker/gunicorn_config.py b/docker/gunicorn_config.py index 878841a..65f4b89 100644 --- a/docker/gunicorn_config.py +++ b/docker/gunicorn_config.py @@ -3,3 +3,6 @@ pythonpath = '/opt/netbox/netbox' bind = '0.0.0.0:8001' workers = 3 user = 'root' +errorlog = '-' +accesslog = '-' +capture_output = False From 552227cca4756c1b282ae5e4bec2be49bc36c5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Mon, 19 Jun 2017 09:30:24 +0200 Subject: [PATCH 2/2] Updates default Docker build branch to a stable version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 183e306..8a63ef8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN apk add --no-cache \ WORKDIR /opt -ARG BRANCH=v2.0-beta3 +ARG BRANCH=v2.0.7 ARG URL=https://github.com/digitalocean/netbox/archive/$BRANCH.tar.gz RUN wget -q -O - "${URL}" | tar xz \ && mv netbox* netbox