Personal_Website/docker-entrypoint.sh

22 lines
346 B
Bash
Executable File

#!/bin/sh
set -e
# first arg is `-f` or `--some-option`
if [ "${1#-}" != "$1" ]; then
set -- apache2-foreground "$@"
fi
while ! curl localhost:3306; do
sleep 5
done
php artisan cache:clear
php artisan config:cache
php artisan route:cache
php artisan event:cache
php artisan view:cache
php artisan migrate --force
exec "$@"