change: volumes in custom directory

This commit is contained in:
mcolonna 2025-06-17 15:22:16 +02:00
parent 4971d79673
commit 39f90db91d
3 changed files with 14 additions and 1 deletions

View file

@ -31,7 +31,9 @@ run : $(CERT_PATH_FILES)
echoo "Running '$(SRC_COMPOSE)'..."
cd -- $(SRC_COMPOSE)
DATABASE_PWD="$(DATABASE_PWD)" $(DOCKER) compose up --build
mkdir -p $(VOLUMES_PATH)/www
mkdir -p $(VOLUMES_PATH)/db
DATABASE_PWD="$(DATABASE_PWD)" VOLUMES_PATH="$(VOLUMES_PATH)" $(DOCKER) compose up --build
>/dev/null cd -

View file

@ -1,2 +1,3 @@
DOMAIN=mcolonna.42.fr
DATABASE_PWD=[insert_cool_password_here]
VOLUMES_PATH=[insert_absolute_path]

View file

@ -40,7 +40,17 @@ services:
volumes:
www:
driver: local
driver_opts:
type: none
device: "${VOLUMES_PATH:?error}/www"
o: bind
db:
driver: local
driver_opts:
type: none
device: "${VOLUMES_PATH:?error}/db"
o: bind
secrets:
database-pwd: