diff --git a/kirby/entrypoint.sh b/kirby/entrypoint.sh index 1127cbc..65e64ad 100644 --- a/kirby/entrypoint.sh +++ b/kirby/entrypoint.sh @@ -5,6 +5,15 @@ set -e PHP_FPM=$(find /usr/sbin -name 'php-fpm*' | head -1) $PHP_FPM +# deploy.php laeuft als www-data, das Repo gehoert einem anderen Benutzer. +# Ohne diese Ausnahme bricht git mit "detected dubious ownership" ab und die +# &&-Kette in deploy.php erreicht hugo nie. --system gilt fuer alle Benutzer. +git config --system --add safe.directory /var/www/html +git config --system --add safe.directory /var/www/html/themes/gokarna + +# www-data muss ins Repo schreiben koennen (git pull, hugo nach public/). +chown -R www-data:www-data /var/www/html || true + # Initial Hugo build cd /var/www/html git submodule update --init --recursive