fix: export variables need to be done by the user, not by the makefile.

This commit is contained in:
damien DELPY 2024-12-04 17:09:56 +01:00
parent 671ac9e88a
commit 7613866ff4
No known key found for this signature in database
2 changed files with 12 additions and 2 deletions

View File

@ -8,12 +8,10 @@ build: dev
dev: ${DIR_BACK}/.env dev: ${DIR_BACK}/.env
cd ${DIR_SQL} && make && cd - cd ${DIR_SQL} && make && cd -
export $(grep -v '^#' back-end/.env.production | xargs)
(. ${DIR_BACK}/.env && ${DOCKER_COMPOSE} -f docker-compose.dev.yml up) || true (. ${DIR_BACK}/.env && ${DOCKER_COMPOSE} -f docker-compose.dev.yml up) || true
prod: prod:
cd ${DIR_SQL} && make && cd - cd ${DIR_SQL} && make && cd -
export $(grep -v '^#' back-end/.env.production | xargs)
(. ${DIR_BACK}/.env.production && ${DOCKER_COMPOSE} -f docker-compose.prod.yml up) || true (. ${DIR_BACK}/.env.production && ${DOCKER_COMPOSE} -f docker-compose.prod.yml up) || true
$(DIR_BACK)/.env: ${DIR_BACK}/.env.example $(DIR_BACK)/.env: ${DIR_BACK}/.env.example

View File

@ -31,3 +31,15 @@ Use the file `docker-compose.prod.yml` to start the app in production mode, it c
``` ```
docker compose -f docker-compose.dev.yml up docker compose -f docker-compose.dev.yml up
``` ```
### TOADD
1) be in the docker group by `sudo usermod -aG docker $USER`
2) `export $(grep -v '^#' back-end/.env.production | xargs)` and then `make`.
### EOF