Compare commits

...

2 Commits

Author SHA1 Message Date
gitea-actions 6c938756cc chore: bump version to v0.1.146
Auto Tag Develop / tag (push) Successful in 6s
Build & Push Docker Image / build (push) Successful in 2m8s
2026-06-19 07:35:42 +00:00
matthieu ac1a51a7f4 fix(prod) : droits www-data sur le volume de logs (#138)
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
2026-06-19 07:35:34 +00:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
parameters:
app.version: '0.1.145'
app.version: '0.1.146'
+1 -1
View File
@@ -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