mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-02-25 19:07:25 +03:00
git safe.directory config for bind-mounted repos.Mark /app as safe directory to handle Git 2.35+ ownership checks in Docker containers.
20 lines
473 B
Bash
Executable File
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
|