change: volumes in custom directory
This commit is contained in:
parent
4971d79673
commit
39f90db91d
3 changed files with 14 additions and 1 deletions
4
Makefile
4
Makefile
|
@ -31,7 +31,9 @@ run : $(CERT_PATH_FILES)
|
||||||
|
|
||||||
echoo "Running '$(SRC_COMPOSE)'..."
|
echoo "Running '$(SRC_COMPOSE)'..."
|
||||||
cd -- $(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 -
|
>/dev/null cd -
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
DOMAIN=mcolonna.42.fr
|
DOMAIN=mcolonna.42.fr
|
||||||
DATABASE_PWD=[insert_cool_password_here]
|
DATABASE_PWD=[insert_cool_password_here]
|
||||||
|
VOLUMES_PATH=[insert_absolute_path]
|
||||||
|
|
|
@ -40,7 +40,17 @@ services:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
www:
|
www:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: none
|
||||||
|
device: "${VOLUMES_PATH:?error}/www"
|
||||||
|
o: bind
|
||||||
db:
|
db:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: none
|
||||||
|
device: "${VOLUMES_PATH:?error}/db"
|
||||||
|
o: bind
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
database-pwd:
|
database-pwd:
|
||||||
|
|
Loading…
Add table
Reference in a new issue