Less home code more F3
This commit is contained in:
@@ -4,11 +4,11 @@ set -eu
|
||||
APP_ROOT="/var/www/html"
|
||||
CONFIG="$APP_ROOT/config.local.ini"
|
||||
|
||||
# Docker creates a directory when bind-mounting a file that doesn't exist on the host.
|
||||
# Remove it so bootstrap.php falls back to defaults.
|
||||
# Docker crée un répertoire si le fichier hôte n'existe pas lors du bind mount.
|
||||
# Le supprimer pour que bootstrap.php retombe sur les valeurs par défaut.
|
||||
if [ -d "$CONFIG" ]; then
|
||||
rmdir "$CONFIG" 2>/dev/null || true
|
||||
echo "Warning: config.local.ini was mounted as a directory (file missing on host). Using defaults."
|
||||
echo "Warning: config.local.ini monté comme répertoire (fichier absent sur l'hôte). Valeurs par défaut utilisées."
|
||||
fi
|
||||
|
||||
install -d -m 0775 -o www-data -g www-data \
|
||||
@@ -19,8 +19,8 @@ install -d -m 0775 -o www-data -g www-data \
|
||||
"$APP_ROOT/tmp/cache" \
|
||||
"$APP_ROOT/tmp/uploads"
|
||||
|
||||
# Bind mounts may keep host-side ownership/permissions. Normalize the writable
|
||||
# application directories before boot so F3 can write its cache and SQLite files.
|
||||
# Les bind mounts peuvent conserver les permissions de l'hôte.
|
||||
# Normaliser les dossiers inscriptibles avant le démarrage.
|
||||
chown -R www-data:www-data \
|
||||
"$APP_ROOT/db" \
|
||||
"$APP_ROOT/logs" \
|
||||
@@ -32,7 +32,7 @@ chmod -R u+rwX,g+rwX \
|
||||
"$APP_ROOT/public/uploads/media" \
|
||||
"$APP_ROOT/tmp"
|
||||
|
||||
# Run installation as the web user so generated files keep consistent ownership.
|
||||
# Exécuter l'installation en tant que www-data pour conserver des permissions cohérentes.
|
||||
su -s /bin/sh www-data -c "php $APP_ROOT/scripts/install.php"
|
||||
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user