From 84887eb811b3836ab8f6fd7f1bd638293bc8ac1d Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 17 Sep 2025 15:26:18 +0200 Subject: [PATCH] remove crappy volume stuff --- compose.yml | 18 ++++-------------- sample.env | 2 +- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/compose.yml b/compose.yml index dc7908c..b5c9c21 100644 --- a/compose.yml +++ b/compose.yml @@ -51,7 +51,7 @@ services: - POSTGRES_DB=${INVENTREE_DB_NAME:?You must provide the 'INVENTREE_DB_NAME' variable in the .env file} volumes: # Map 'data' volume such that postgres database is stored externally - - inventree_data:/var/lib/postgresql/data/:z + - ${INVENTREE_EXT_VOLUME:?You must specify the 'INVENTREE_EXT_VOLUME' variable in the .env file!}:/var/lib/postgresql/data/:z restart: unless-stopped # redis acts as database cache manager @@ -98,7 +98,7 @@ services: - inventree-db volumes: # Data volume must map to /home/inventree/data - - inventree_data:/home/inventree/data:z + - ${INVENTREE_EXT_VOLUME:?You must specify the 'INVENTREE_EXT_VOLUME' variable in the .env file!}:/home/inventree/data:z - ./plugins:/home/inventree/InvenTree/plugins:z restart: unless-stopped @@ -114,7 +114,7 @@ services: - .env volumes: # Data volume must map to /home/inventree/data - - inventree_data:/home/inventree/data:z + - ${INVENTREE_EXT_VOLUME:?You must specify the 'INVENTREE_EXT_VOLUME' variable in the .env file!}:/home/inventree/data:z restart: unless-stopped # nginx acts as a reverse proxy @@ -135,15 +135,5 @@ services: # Refer to the provided example file as a starting point - ./nginx.prod.conf:/etc/nginx/conf.d/default.conf:ro,Z # nginx proxy needs access to static and media files - - inventree_data:/var/www:z + - ${INVENTREE_EXT_VOLUME:?You must specify the 'INVENTREE_EXT_VOLUME' variable in the .env file!}:/var/www:z restart: unless-stopped - -volumes: - # Persistent data, stored external to the container(s) - inventree_data: - driver: local - driver_opts: - type: none - o: bind - # This directory specified where InvenTree data are stored "outside" the docker containers - device: ${INVENTREE_EXT_VOLUME:?You must specify the 'INVENTREE_EXT_VOLUME' variable in the .env file!} diff --git a/sample.env b/sample.env index b22915b..1904bc9 100644 --- a/sample.env +++ b/sample.env @@ -5,7 +5,7 @@ COMPOSE_PROJECT_NAME=inventree # Note: You *must* un-comment this line, and point it to a path on your local machine # e.g. Linux -INVENTREE_EXT_VOLUME=data +INVENTREE_EXT_VOLUME=./data # e.g. Windows (docker desktop) #INVENTREE_EXT_VOLUME=c:/Users/me/inventree-data