2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Add option to specify config file via environment variable

This commit is contained in:
Oliver Walters
2021-04-07 23:46:03 +10:00
parent 9c38d67b52
commit d4d9263131
4 changed files with 23 additions and 17 deletions

View File

@ -3,7 +3,6 @@ FROM python:alpine as production
# GitHub source
ARG INVENTREE_REPO="https://github.com/inventree/InvenTree.git"
ARG INVENTREE_VERSION="master"
ARG INVENTREE_CONFIG_FILE="InvenTree/config_template.yaml"
ENV PYTHONUNBUFFERED 1
@ -79,18 +78,15 @@ RUN apk add --no-cache supervisor
RUN mkdir ${INVENTREE_HOME}/media ${INVENTREE_HOME}/static ${INVENTREE_HOME}/backup
# Copy supervisor file
COPY docker/supervisord.conf ${INVENTREE_HOME}/supervisord.conf
COPY supervisord.conf ${INVENTREE_HOME}/supervisord.conf
# Copy gunicorn config file
COPY docker/gunicorn.conf.py ${INVENTREE_HOME}/gunicorn.conf.py
# Copy default InvenTree config file
COPY ${INVENTREE_CONFIG_FILE} ${INVENTREE_SRC_DIR}/InvenTree/config.yaml
COPY gunicorn.conf.py ${INVENTREE_HOME}/gunicorn.conf.py
# Copy startup script
COPY docker/start.sh ${INVENTREE_HOME}/start.sh
COPY start.sh ${INVENTREE_HOME}/start.sh
RUN chmod 755 ${INVENTREE_HOME}/start.sh
# Let us begin
CMD "./start.sh"
CMD ["bash", "./start.sh"]