22 lines
408 B
Bash
22 lines
408 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
if [ ! -f .env ]; then
|
|
cp .env.example .env
|
|
fi
|
|
|
|
php docker/sync-env.php
|
|
php artisan optimize:clear
|
|
|
|
if [ -n "${APP_KEY:-}" ]; then
|
|
echo "APP_KEY provided by environment, skipping key generation."
|
|
elif ! grep -q '^APP_KEY=base64:' .env; then
|
|
php artisan key:generate --force
|
|
fi
|
|
|
|
php docker/wait-for-database.php
|
|
php artisan migrate --force
|
|
php artisan db:seed --force
|
|
|
|
exec "$@"
|