2021-04-07 06:02:22 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-04-07 05:06:48 +00:00
|
|
|
|
|
|
|
# update application cache
|
|
|
|
php artisan optimize
|
|
|
|
|
2021-04-07 06:02:22 +00:00
|
|
|
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
|
|
|
|
|
2021-04-07 05:06:48 +00:00
|
|
|
# start the application
|
|
|
|
|
|
|
|
php-fpm -D && nginx -g "daemon off;"
|