fix(directory) : rend var/uploads writable en local (LST-72)
Le volume Docker nommé `uploads_data` est créé root:root, or PHP-FPM tourne en www-data (= uid host) : sans chown, l'upload de documents échoue en local avec « mkdir(): Permission denied ». Ajoute un target `fix-uploads-perm` idempotent, branché sur `install` (donc relancé par `reset`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@ restart: env-init
|
||||
$(DOCKER_COMPOSE) down
|
||||
CURRENT_UID=$(shell id -u) CURRENT_GID=$(shell id -g) $(DOCKER_COMPOSE) up -d
|
||||
|
||||
install: copy-git-hook composer-install cache-clear node-use build-nuxtJS migration-migrate sync-permissions
|
||||
install: copy-git-hook composer-install cache-clear node-use build-nuxtJS migration-migrate sync-permissions fix-uploads-perm
|
||||
|
||||
# Supprime tout est réinstalle tout (Attention ça supprime la bdd aussi)
|
||||
reset: delete_built_dir remove_orphans build-without-cache start wait install
|
||||
@@ -81,6 +81,13 @@ migration-migrate:
|
||||
sync-permissions:
|
||||
$(SYMFONY_CONSOLE) app:sync-permissions
|
||||
|
||||
# Le volume nommé `uploads_data` est créé root:root par Docker (il masque le
|
||||
# bind-mount), or PHP-FPM tourne en www-data (= uid host) : sans ce chown, les
|
||||
# uploads (documents de compte-rendu, avatars, justificatifs…) échouent en local
|
||||
# avec « mkdir(): Permission denied ». Idempotent — relancé par `install`/`reset`.
|
||||
fix-uploads-perm:
|
||||
$(EXEC_PHP_ROOT) chown -R www-data:www-data /var/www/html/var/uploads
|
||||
|
||||
fixtures:
|
||||
$(SYMFONY_CONSOLE) --no-interaction doctrine:fixtures:load
|
||||
|
||||
|
||||
Reference in New Issue
Block a user