remove crappy volume stuff

This commit is contained in:
Philipp Fruck 2024-05-19 16:11:04 +02:00
parent 1a89213c80
commit b0b5ab3c53
No known key found for this signature in database
GPG key ID: 9B7D2672DB7F47AD
2 changed files with 5 additions and 15 deletions

View file

@ -51,7 +51,7 @@ services:
- POSTGRES_DB=${INVENTREE_DB_NAME:?You must provide the 'INVENTREE_DB_NAME' variable in the .env file} - POSTGRES_DB=${INVENTREE_DB_NAME:?You must provide the 'INVENTREE_DB_NAME' variable in the .env file}
volumes: volumes:
# Map 'data' volume such that postgres database is stored externally # 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 restart: unless-stopped
# redis acts as database cache manager # redis acts as database cache manager
@ -98,7 +98,7 @@ services:
- inventree-db - inventree-db
volumes: volumes:
# Data volume must map to /home/inventree/data # 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 - ./plugins:/home/inventree/InvenTree/plugins:z
restart: unless-stopped restart: unless-stopped
@ -114,7 +114,7 @@ services:
- .env - .env
volumes: volumes:
# Data volume must map to /home/inventree/data # 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 restart: unless-stopped
# nginx acts as a reverse proxy # nginx acts as a reverse proxy
@ -135,15 +135,5 @@ services:
# Refer to the provided example file as a starting point # Refer to the provided example file as a starting point
- ./nginx.prod.conf:/etc/nginx/conf.d/default.conf:ro,Z - ./nginx.prod.conf:/etc/nginx/conf.d/default.conf:ro,Z
# nginx proxy needs access to static and media files # 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 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!}

View file

@ -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 # Note: You *must* un-comment this line, and point it to a path on your local machine
# e.g. Linux # e.g. Linux
INVENTREE_EXT_VOLUME=data INVENTREE_EXT_VOLUME=./data
# e.g. Windows (docker desktop) # e.g. Windows (docker desktop)
#INVENTREE_EXT_VOLUME=c:/Users/me/inventree-data #INVENTREE_EXT_VOLUME=c:/Users/me/inventree-data