my-idlers/run.sh

15 lines
335 B
Bash
Raw Normal View History

2022-03-13 21:09:50 +01:00
#!/bin/sh
2024-06-21 08:10:43 +02:00
# Load environment variables from .env.production
set -o allexport
source .env.production
set +o allexport
2022-03-13 21:09:50 +01:00
2024-06-21 08:10:43 +02:00
# Check if the database file exists and is not empty
if [ ! -s $DB_DATABASE ]
then
touch $DB_DATABASE
php artisan migrate:fresh --seed --force
fi
2024-06-21 08:10:43 +02:00
php artisan serve --host=0.0.0.0 --port=8000 --env=production