diff --git a/docker-compose.yml b/docker-compose.yml index e76f37d..844a94f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,17 +17,14 @@ version: "3.8" services: # InvenTree web server services # Uses gunicorn as the web server - inventree-server: - container_name: inventree-server - # If you wish to specify a particular InvenTree version, do so here - # e.g. image: inventree/inventree:0.5.2 - image: inventree/inventree:latest + core: + container_name: ${INVENTREE_CORE_CONTAINER_NAME:-inventree_core} + image: inventree/inventree:${INVENTREE_VERSION:-latest} + restart: unless-stopped expose: - 8000 volumes: - # Data volume must map to /home/inventree/data - data:/home/inventree/data - restart: unless-stopped environment: INVENTREE_DEBUG: False INVENTREE_LOG_LEVEL: WARNING @@ -39,18 +36,15 @@ services: INVENTREE_DB_PASSWORD: ${INVENTREE_DB_PASSWORD:?err} # Background worker process handles long-running or periodic tasks - inventree-worker: - container_name: inventree-worker - # If you wish to specify a particular InvenTree version, do so here - # e.g. image: inventree/inventree:0.5.2 - image: inventree/inventree:latest + worker: + container_name: ${INVENTREE_WORKER_CONTAINER_NAME:-inventree_worker} + image: inventree/inventree:${INVENTREE_VERSION:-latest} + restart: unless-stopped command: invoke worker depends_on: - - inventree-server + - core volumes: - # Data volume must map to /home/inventree/data - data:/home/inventree/data - restart: unless-stopped environment: INVENTREE_DEBUG: False INVENTREE_LOG_LEVEL: WARNING @@ -66,30 +60,19 @@ services: # media files are served by nginx, although authentication is redirected to inventree-server # web requests are redirected to gunicorn # NOTE: You will need to provide a working nginx.conf file! - inventree-proxy: - container_name: inventree-proxy - image: nginx:stable + proxy: + container_name: ${INVENTREE_PROXY_CONTAINER_NAME:-inventree_proxy} + image: nginx:${INVENTREE_PROXY_VERSION:-stable} + restart: unless-stopped depends_on: - - inventree-server + - core ports: - # Change "1337" to the port that you want InvenTree web server to be available on - - 1337:80 + - ${INVENTREE_HOST_IP_ADDRESS:-127.0.0.1}:${INVENTREE_HOST_PORT:-1337}:80 volumes: # Provide ./nginx.conf file to the container # Refer to the provided example file as a starting point - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro - # nginx proxy needs access to static and media files - data:/var/www - restart: unless-stopped volumes: - # NOTE: Change /path/to/data to a directory on your local machine - # Persistent data, stored external to the container(s) data: - driver: local - driver_opts: - type: none - o: bind - # This directory specified where InvenTree data are stored "outside" the docker containers - # Change this path to a local system path where you want InvenTree data stored - device: /path/to/data