Matt Burchett
2e10d5d0ab
All checks were successful
continuous-integration/drone/push Build is passing
24 lines
452 B
Bash
24 lines
452 B
Bash
#!/usr/bin/env bash
|
|
|
|
# update application cache
|
|
php artisan optimize
|
|
|
|
if [[ ! -f /data/database.sqlite ]]; then
|
|
echo "No database found. Creating."
|
|
touch /data/database.sqlite
|
|
fi
|
|
|
|
# perform DB migrations
|
|
|
|
if [[ ! -f ./database/database.sqlite ]]; then
|
|
echo "No link to database. Linking database."
|
|
ln -s /data/database.sqlite ./database/database.sqlite
|
|
fi
|
|
|
|
|
|
php artisan migrate
|
|
|
|
# start the application
|
|
|
|
php-fpm -D && nginx -g "daemon off;"
|