diff --git a/.env.example b/.env.example index ab06ec3..df3f4d5 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/deploy/conf.d/nginx.conf b/deploy/conf.d/nginx.conf index f199206..3396a66 100644 --- a/deploy/conf.d/nginx.conf +++ b/deploy/conf.d/nginx.conf @@ -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 / { diff --git a/post_deploy.sh b/post_deploy.sh index 419740f..40edf6d 100644 --- a/post_deploy.sh +++ b/post_deploy.sh @@ -3,18 +3,29 @@ # 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 + if [[ ! -f /data/database.sqlite ]]; then + echo "No database found. Creating." + touch /data/database.sqlite + fi + 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