From d58930ab670cddf975a1f2715dc7860c2904f5a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ma=CC=88der?= Date: Wed, 30 Aug 2017 11:09:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20Adds=20the=20possibility=20to=20?= =?UTF-8?q?overwrite=20the=20CMD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 ++ docker/docker-entrypoint.sh | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b79efd4..8a6273a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,3 +37,5 @@ COPY docker/docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT [ "/docker-entrypoint.sh" ] VOLUME ["/etc/netbox-nginx/"] + +CMD ["gunicorn", "--log-level debug", "-c /opt/netbox/gunicorn_config.py", "netbox.wsgi"] diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index d921de0..f830bd5 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -23,5 +23,8 @@ END # copy static files ./manage.py collectstatic --no-input -# start unicorn -gunicorn --log-level debug --debug -c /opt/netbox/gunicorn_config.py netbox.wsgi +echo "✅ Initialisation is done. Launching CMD:" +echo "exec ${@}" + +# launch whatever is passed by docker via RUN +exec ${@}