mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Simplified volume management in docker-compose
This commit is contained in:
parent
178715ce61
commit
823f84e46a
@ -20,9 +20,7 @@ services:
|
||||
- POSTGRES_USER=pguser
|
||||
- POSTGRES_PASSWORD=pgpassword
|
||||
volumes:
|
||||
# Map external directory to store database data
|
||||
# Replace /path/to/dir with the required external path
|
||||
- /mnt/c/abcdatabase:/var/lib/postgresql/data/
|
||||
- data:/var/lib/postgresql/data/
|
||||
restart: unless-stopped
|
||||
|
||||
server:
|
||||
@ -38,9 +36,7 @@ services:
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
# Map external directory to store InvenTree data
|
||||
# Replace /path/to/dir with the required external path
|
||||
- /mnt/c/abcde:/home/inventree/data
|
||||
- data:/home/inventree/data
|
||||
environment:
|
||||
- INVENTREE_DB_ENGINE=postgresql
|
||||
- INVENTREE_DB_NAME=inventree
|
||||
@ -62,6 +58,8 @@ services:
|
||||
depends_on:
|
||||
- db
|
||||
- server
|
||||
volumes:
|
||||
- data:/home/inventree/data
|
||||
environment:
|
||||
- INVENTREE_DB_ENGINE=postgresql
|
||||
- INVENTREE_DB_NAME=inventree
|
||||
@ -70,3 +68,12 @@ services:
|
||||
- INVENTREE_DB_PORT=5432
|
||||
- INVENTREE_DB_HOST=db
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
# This directory specified where InvenTree data are stored "outside" the docker containers
|
||||
device: c:/abcdef
|
Loading…
Reference in New Issue
Block a user