Personal_Website/docker-entrypoint.sh

22 lines
342 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 mysql:3306; do
sleep 1
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 "$@"