From 67196b866e6db5023d73f38d2a4b7bb87a078c1a Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 21 Apr 2022 01:13:34 +1000 Subject: [PATCH] Compose script fixes - Define INVENTREE_DB_NAME - Cache built image --- docker/docker-compose.sqlite.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docker/docker-compose.sqlite.yml b/docker/docker-compose.sqlite.yml index 0c08109af5..9800788b1d 100644 --- a/docker/docker-compose.sqlite.yml +++ b/docker/docker-compose.sqlite.yml @@ -21,6 +21,8 @@ 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 @@ -30,14 +32,13 @@ services: 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 @@ -47,6 +48,7 @@ services: 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:-../}