fix(prod) : droits www-data sur le volume de logs (#138)
Auto Tag Develop / tag (push) Successful in 8s
Auto Tag Develop / tag (push) Successful in 8s
## Problème Le volume nommé `starseed_logs` est monté sur `/var/www/html/var/log` (docker-compose.prod.yml), mais ce dossier **n'existe pas dans l'image**. Au premier montage d'un volume vide, Docker crée le point de montage en `root:root`, ce qui empêche `www-data` (le worker php-fpm) d'écrire les logs → crash de l'application. Même problème que celui rencontré et patché à la main sur Lesstime. ## Correctif Ajout de `var/log` au `mkdir -p` du Dockerfile, avant le `chown -R www-data:www-data`. Ainsi tout volume de logs neuf hérite automatiquement des droits `www-data` — plus besoin de chown manuel. ## Déploiement Nécessite un rebuild + push de l'image pour prendre effet en prod. --------- Co-authored-by: Matthieu <contact@malio.fr> Reviewed-on: #138
This commit was merged in pull request #138.
This commit is contained in:
@@ -75,7 +75,7 @@ COPY infra/prod/maintenance.html /var/www/html/public/maintenance.html
|
||||
RUN echo "APP_ENV=prod" > /var/www/html/.env
|
||||
|
||||
# Permissions
|
||||
RUN mkdir -p /var/www/html/var /var/www/html/config/jwt \
|
||||
RUN mkdir -p /var/www/html/var /var/www/html/var/log /var/www/html/config/jwt \
|
||||
&& chown -R www-data:www-data /var/www/html/var
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
Reference in New Issue
Block a user