updating post_deploy script
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Matt Burchett 2021-04-06 23:25:08 -07:00
parent 2e10d5d0ab
commit b6670a0f6e
3 changed files with 23 additions and 11 deletions

View File

@ -1,8 +1,8 @@
APP_NAME=Laravel
APP_NAME=EliteRegistry
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_URL=https://eliteregistry
LOG_CHANNEL=stack
LOG_LEVEL=debug

View File

@ -34,6 +34,7 @@ http {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
}
location / {

View File

@ -3,18 +3,29 @@
# update application cache
php artisan optimize
# perform DB migrations
if [[ ! -f ./database/database.sqlite ]]; then
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
if [[ ! -f ./.env ]]; then
if [[ ! -f /data/.env ]]; then
echo "No enviroment found. Creating."
cp .env.example /data/.env
fi
echo "No link to environment. Linking environment."
ln -s /data/.env ./.env
php artisan key:generate
fi
fi
php artisan migrate