diff --git a/docker/docker-compose.sqlite.yml b/docker/docker-compose.sqlite.yml index e42c43a09c..9800788b1d 100644 --- a/docker/docker-compose.sqlite.yml +++ b/docker/docker-compose.sqlite.yml @@ -21,32 +21,34 @@ services: build: context: . target: dev + # Cache the built image to be used by the inventree-dev-worker process + image: inventree-dev-image ports: # Expose web server on port 8000 - 8000:8000 volumes: # Ensure you specify the location of the 'src' directory at the end of this file - src:/home/inventree - env_file: - # Environment variables required for the dev server are configured in dev-config.env - - sqlite-config.env + environment: + - INVENTREE_DEBUG=True + - INVENTREE_DB_ENGINE=sqlite + - INVENTREE_DB_NAME=/home/inventree/db.sqlite3 restart: unless-stopped # Background worker process handles long-running or periodic tasks inventree-dev-worker: container_name: inventree-dev-worker - build: - context: . - target: dev + image: inventree-dev-image command: invoke worker depends_on: - inventree-dev-server volumes: # Ensure you specify the location of the 'src' directory at the end of this file - src:/home/inventree - env_file: - # Environment variables required for the dev server are configured in dev-config.env - - sqlite-config.env + environment: + - INVENTREE_DEBUG=True + - INVENTREE_DB_ENGINE=sqlite + - INVENTREE_DB_NAME=/home/inventree/db.sqlite3 restart: unless-stopped volumes: @@ -59,4 +61,4 @@ volumes: o: bind # This directory specified where InvenTree source code is stored "outside" the docker containers # By default, this directory is one level above the "docker" directory - device: ../ + device: ${INVENTREE_EXT_VOLUME:-../} diff --git a/docker/production/.env b/docker/production/.env index b1c9430b51..d1fca305d1 100644 --- a/docker/production/.env +++ b/docker/production/.env @@ -22,8 +22,11 @@ INVENTREE_DB_ENGINE=postgresql INVENTREE_DB_NAME=inventree INVENTREE_DB_HOST=inventree-db INVENTREE_DB_PORT=5432 -INVENTREE_DB_USER=pguser -INVENTREE_DB_PASSWORD=pgpassword + +# Database credentials - These must be configured before running +# Uncomment the lines below, and change from the default values! +#INVENTREE_DB_USER=pguser +#INVENTREE_DB_PASSWORD=pgpassword # Enable plugins? INVENTREE_PLUGINS_ENABLED=False