diff --git a/docker/Dockerfile b/docker/Dockerfile index ffba72f4c6..04d85184bd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -16,6 +16,10 @@ ARG INVENTREE_DB_PASSWORD="" ENV PYTHONUNBUFFERED 1 +# InvenTree key settings +ENV INVENTREE_HOME="${INVENTREE_HOME}" +ENV INVENTREE_PORT="${INVENTREE_PORT}" + # InvenTree paths ENV INVENTREE_SRC_DIR="${INVENTREE_HOME}/src" ENV INVENTREE_STATIC_ROOT="${INVENTREE_HOME}/static" @@ -78,6 +82,6 @@ RUN apk add --no-cache supervisor RUN mkdir /home/inventree/media /home/inventree/static /home/inventree/log /home/inventree/backup # Copy supervisor file -COPY docker/inventree.conf /etc/supervisor/conf.d/inventree.conf +COPY docker/supervisor.conf /etc/supervisord.conf -CMD ["/usr/bin/supervisord"] +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"] diff --git a/docker/inventree.conf b/docker/supervisor.conf similarity index 69% rename from docker/inventree.conf rename to docker/supervisor.conf index dabf9ddafb..72609e5bac 100644 --- a/docker/inventree.conf +++ b/docker/supervisor.conf @@ -13,8 +13,6 @@ ; InvenTree uses django-q for this purpose [supervisord] -; Change this path if log files are stored elsewhere -logfile=/home/inventree/log/supervisor.log nodaemon=true [program:inventree-server] @@ -25,9 +23,10 @@ startsecs=10 autostart=true autorestart=true startretries=3 -; Change these paths if log files are stored elsewhere -stderr_logfile=/home/inventree/log/server.err.log -stdout_logfile=/home/inventree/log/server.out.log +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/fd/2 +stderr_logfile_maxbytes=0 [program:inventree-cluster] user=inventree @@ -36,6 +35,7 @@ command=/home/inventree/env/bin/python manage.py qcluster startsecs=10 autostart=true autorestart=true -; Change these paths if log files are stored elsewhere -stderr_logfile=/home/inventree/log/cluster.err.log -stdout_logfile=/home/inventree/log/cluster.out.log \ No newline at end of file +stdout_logfile=/dev/fd/1 +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/fd/2 +stderr_logfile_maxbytes=0 \ No newline at end of file