eliteregistry/post_deploy.sh
Matt Burchett 2e10d5d0ab
All checks were successful
continuous-integration/drone/push Build is passing
Adding Dockerfile, drone build
2021-04-06 23:02:22 -07:00

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;"