Modification de la conf docker (!8)

| Numéro du ticket | Titre du ticket |
|------------------|-----------------|
|                  |                 |

## Description de la PR

## Modification du .env

## Check list

- [ ] Pas de régression
- [ ] TU/TI/TF rédigée
- [ ] TU/TI/TF OK
- [ ] CHANGELOG modifié

Reviewed-on: https://gitea.malio.fr/MALIO-DEV/Ferme/pulls/8
Co-authored-by: sroy <sebastien@yuno.malio.fr>
Co-committed-by: sroy <sebastien@yuno.malio.fr>
This commit is contained in:
sroy
2026-02-03 10:33:53 +00:00
committed by Autin
parent d8e1cdc72c
commit a34bdbfe8d
5 changed files with 77 additions and 38 deletions
+11 -9
View File
@@ -7,6 +7,9 @@ ENV_FILE := $(if $(wildcard $(ENV_LOCAL)),$(ENV_LOCAL),$(ENV_DEFAULT))
include $(ENV_DEFAULT)
-include $(ENV_LOCAL)
HOST_UID := $(if $(SUDO_UID),$(SUDO_UID),$(shell id -u))
HOST_GID := $(if $(SUDO_GID),$(SUDO_GID),$(shell id -g))
PHP_CONTAINER = php-$(DOCKER_APP_NAME)-fpm
SYMFONY_CONSOLE = $(EXEC_PHP) php bin/console
@@ -24,13 +27,13 @@ FILES =
env-init:
@mkdir -p docker
@cp --update=none $(ENV_DEFAULT) $(ENV_LOCAL)
@cp -n $(ENV_DEFAULT) $(ENV_LOCAL)
# Lance le container
start: env-init
@echo "**** START CONTAINERS ****"
@cp --update=none docker/.env.docker docker/.env.docker.local
CURRENT_UID=$(shell id -u) CURRENT_GID=$(shell id -g) $(DOCKER_COMPOSE) up -d
@cp -n docker/.env.docker docker/.env.docker.local
CURRENT_UID=$(HOST_UID) CURRENT_GID=$(HOST_GID) $(DOCKER_COMPOSE) up -d
# Éteint le container
stop:
@@ -38,7 +41,7 @@ stop:
restart: env-init
$(DOCKER_COMPOSE) down
CURRENT_UID=$(shell id -u) CURRENT_GID=$(shell id -g) $(DOCKER_COMPOSE) up -d
CURRENT_UID=$(HOST_UID) CURRENT_GID=$(HOST_GID) $(DOCKER_COMPOSE) up -d
install: copy-git-hook composer-install cache-clear node-use build-nuxtJS migration-migrate
@@ -57,9 +60,8 @@ dev-nuxt:
$(EXEC_PHP) sh -c "cd frontend && npm run dev"
delete_built_dir:
CURRENT_UID=$(shell id -u) CURRENT_GID=$(shell id -g) $(DOCKER_COMPOSE) up -d
$(DOCKER) exec -u root $(PHP_CONTAINER) rm -rf vendor/
$(DOCKER) exec -u root $(PHP_CONTAINER) rm -rf frontend/node_modules
rm -rf vendor/
rm -rf frontend/node_modules
remove_orphans:
$(DOCKER_COMPOSE) kill
@@ -69,8 +71,8 @@ build-without-cache:
$(DOCKER_COMPOSE) build \
--build-arg="DOCKER_PHP_VERSION=$(DOCKER_PHP_VERSION)" \
--build-arg="DOCKER_NODE_VERSION=$(DOCKER_NODE_VERSION)" \
--build-arg="CURRENT_UID=$(shell id -u)" \
--build-arg="CURRENT_GID=$(shell id -g)" \
--build-arg="CURRENT_UID=$(HOST_UID)" \
--build-arg="CURRENT_GID=$(HOST_GID)" \
--no-cache
migration-migrate: