Compare commits

...

2 Commits

Author SHA1 Message Date
francesco
abd6e5c21b ++ fix 2026-06-19 16:40:19 +02:00
francesco
5a32bebe32 ++ fix Permessi "app" 2026-06-17 17:47:05 +02:00
2 changed files with 19 additions and 2 deletions

View File

@@ -5,7 +5,8 @@ services:
dockerfile: docker/php/Dockerfile
container_name: termanager2_app
restart: unless-stopped
user: "1000:1000"
# Runs as root so the entrypoint can mkdir/chown the bind-mounted storage;
# php-fpm workers drop to www-data via docker/php/www.conf.
working_dir: /var/www/html
volumes:
- ./:/var/www/html
@@ -24,6 +25,14 @@ services:
start_period: 45s
environment:
- PHP_OPCACHE_VALIDATE_TIMESTAMPS=1
# DB/Redis creds must be passed into the container so the entrypoint can
# upsert them into .env. Defaults match the mariadb/redis services below.
- DB_HOST=${DB_HOST:-mariadb}
- DB_DATABASE=${DB_DATABASE:-termanager2}
- DB_USERNAME=${DB_USERNAME:-termanager2}
- DB_PASSWORD=${DB_PASSWORD:-secret}
- REDIS_HOST=${REDIS_HOST:-redis}
- REDIS_PASSWORD=${REDIS_PASSWORD:-redissecret}
- SEED_DEV_DATA=${SEED_DEV_DATA:-false}
- RUN_DB_SEED_ON_FIRST_START=${RUN_DB_SEED_ON_FIRST_START:-true}
- ENSURE_INITIAL_ADMIN_ON_EMPTY_DB=${ENSURE_INITIAL_ADMIN_ON_EMPTY_DB:-true}
@@ -53,7 +62,8 @@ services:
dockerfile: docker/php/Dockerfile
container_name: termanager2_queue
restart: unless-stopped
user: "1000:1000"
# Same UID as php-fpm workers, so storage files stay consistent.
user: "www-data"
working_dir: /var/www/html
volumes:
- ./:/var/www/html

View File

@@ -174,6 +174,13 @@ else
echo "[✓] Storage symlink already exists."
fi
# -----------------------------------------------
# 6b. Clear any stale cached config from a previous deploy
# (a cached bootstrap/cache/config.php would override the .env above)
# -----------------------------------------------
echo "[*] Clearing stale cached config..."
php artisan config:clear || warn "config:clear failed; continuing startup."
# -----------------------------------------------
# 7. Run migrations
# -----------------------------------------------