diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 265f8b7c1c..e3a86b195f 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -6,6 +6,13 @@ version: "3.8" # - Runs nginx as a reverse proxy # - Runs the background worker process +# --------------------------------- +# IMPORTANT - READ BEFORE STARTING! +# --------------------------------- +# Before running, ensure that you change the "/path/to/data" directory, +# specified in the "volumes" section at the end of this file. +# This path determines where the InvenTree data will be stored! + services: # Database service # Use PostgreSQL as the database backend @@ -28,7 +35,7 @@ services: # Uses gunicorn as the web server inventree: build: - context: . + context: inventree args: repository: "https://github.com/SchrodingersGat/InvenTree.git" branch: "django-q" @@ -68,7 +75,7 @@ services: # background worker process handles long-running or periodic tasks worker: build: - context: . + context: inventree args: repository: "https://github.com/SchrodingersGat/InvenTree.git" branch: "django-q" diff --git a/docker/Dockerfile b/docker/inventree/Dockerfile similarity index 100% rename from docker/Dockerfile rename to docker/inventree/Dockerfile diff --git a/docker/gunicorn.conf.py b/docker/inventree/gunicorn.conf.py similarity index 100% rename from docker/gunicorn.conf.py rename to docker/inventree/gunicorn.conf.py diff --git a/docker/start_server.sh b/docker/inventree/start_server.sh similarity index 100% rename from docker/start_server.sh rename to docker/inventree/start_server.sh diff --git a/docker/start_worker.sh b/docker/inventree/start_worker.sh similarity index 100% rename from docker/start_worker.sh rename to docker/inventree/start_worker.sh diff --git a/docker/supervisord.conf b/docker/supervisord.conf deleted file mode 100644 index b99c48edcf..0000000000 --- a/docker/supervisord.conf +++ /dev/null @@ -1,43 +0,0 @@ -; # Supervisor Config File (for docker build) -; -; This config file is specific to the InvenTree docker build! -; -; There are two separate processes which must be managed: -; -; ## Web Server -; The InvenTree server must be launched and managed as a process -; The recommended way to handle the web server is to use gunicorn -; -; ## Background Tasks -; A background task manager processes long-running and periodic tasks -; InvenTree uses django-q for this purpose - -[supervisord] -user=inventree -nodaemon=true - -[supervisorctl] -serverurl=unix:///var/run/supervisor.sock - -[program:inventree-server] -user=inventree -directory=%(ENV_INVENTREE_SRC_DIR)s/InvenTree -command=%(ENV_INVENTREE_VENV)s/bin/gunicorn -c %(ENV_INVENTREE_HOME)s/gunicorn.conf.py InvenTree.wsgi -b 127.0.0.1:8080 -startsecs=10 -autostart=true -autorestart=true -startretries=3 -stdout_logfile=/dev/fd/1 -stdout_logfile_maxbytes=0 -redirect_stderr=true - -[program:inventree-cluster] -user=inventree -directory=%(ENV_INVENTREE_SRC_DIR)s/InvenTree -command=%(ENV_INVENTREE_VENV)s/bin/python DJANGO_SETTINGS_FILE=InvenTree.settings manage.py qcluster -startsecs=10 -autostart=true -autorestart=true -stdout_logfile=/dev/fd/1 -stdout_logfile_maxbytes=0 -redirect_stderr=true \ No newline at end of file