Files
BookStack/dev/docker/entrypoint.app.sh
leon 5c4fc3dc2c fix: Docker: Add
git safe.directory config for bind-mounted repos.Mark
 /app as safe directory to handle Git 2.35+ ownership
 checks in Docker containers.
2025-12-31 11:53:22 +08:00

20 lines
473 B
Bash
Executable File

#!/bin/bash
# Git 2.35+ may refuse to operate on bind-mounted repos with differing ownership ("dubious ownership").
# Mark /app as safe within the container.
git config --global --add safe.directory /app 2>/dev/null || true
set -e
env
if [[ -n "$1" ]]; then
exec "$@"
else
composer install
wait-for-it db:3306 -t 45
php artisan migrate --database=mysql --force
chown -R www-data storage public/uploads bootstrap/cache
exec apache2-foreground
fi