mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 04:56:45 +00:00
Dockerfile updates
- Pipe supervisor logs to stdout (so they are passed to the docker instance) - Fix supervisor service - Expose home dir and port as env vars
This commit is contained in:
parent
d446f8ddd1
commit
839c29117d
@ -16,6 +16,10 @@ ARG INVENTREE_DB_PASSWORD=""
|
|||||||
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
|
# InvenTree key settings
|
||||||
|
ENV INVENTREE_HOME="${INVENTREE_HOME}"
|
||||||
|
ENV INVENTREE_PORT="${INVENTREE_PORT}"
|
||||||
|
|
||||||
# InvenTree paths
|
# InvenTree paths
|
||||||
ENV INVENTREE_SRC_DIR="${INVENTREE_HOME}/src"
|
ENV INVENTREE_SRC_DIR="${INVENTREE_HOME}/src"
|
||||||
ENV INVENTREE_STATIC_ROOT="${INVENTREE_HOME}/static"
|
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
|
RUN mkdir /home/inventree/media /home/inventree/static /home/inventree/log /home/inventree/backup
|
||||||
|
|
||||||
# Copy supervisor file
|
# 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"]
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
; InvenTree uses django-q for this purpose
|
; InvenTree uses django-q for this purpose
|
||||||
|
|
||||||
[supervisord]
|
[supervisord]
|
||||||
; Change this path if log files are stored elsewhere
|
|
||||||
logfile=/home/inventree/log/supervisor.log
|
|
||||||
nodaemon=true
|
nodaemon=true
|
||||||
|
|
||||||
[program:inventree-server]
|
[program:inventree-server]
|
||||||
@ -25,9 +23,10 @@ startsecs=10
|
|||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
startretries=3
|
startretries=3
|
||||||
; Change these paths if log files are stored elsewhere
|
stdout_logfile=/dev/fd/1
|
||||||
stderr_logfile=/home/inventree/log/server.err.log
|
stdout_logfile_maxbytes=0
|
||||||
stdout_logfile=/home/inventree/log/server.out.log
|
stderr_logfile=/dev/fd/2
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
[program:inventree-cluster]
|
[program:inventree-cluster]
|
||||||
user=inventree
|
user=inventree
|
||||||
@ -36,6 +35,7 @@ command=/home/inventree/env/bin/python manage.py qcluster
|
|||||||
startsecs=10
|
startsecs=10
|
||||||
autostart=true
|
autostart=true
|
||||||
autorestart=true
|
autorestart=true
|
||||||
; Change these paths if log files are stored elsewhere
|
stdout_logfile=/dev/fd/1
|
||||||
stderr_logfile=/home/inventree/log/cluster.err.log
|
stdout_logfile_maxbytes=0
|
||||||
stdout_logfile=/home/inventree/log/cluster.out.log
|
stderr_logfile=/dev/fd/2
|
||||||
|
stderr_logfile_maxbytes=0
|
Loading…
x
Reference in New Issue
Block a user