Add seeding for database
This commit is contained in:
parent
8e1f7869e2
commit
3f44fbe5b0
|
@ -28,7 +28,7 @@ fi
|
||||||
if [ $1 == "app" ]; then
|
if [ $1 == "app" ]; then
|
||||||
# --------------------------- ensure appkey is set ----------------------------
|
# --------------------------- ensure appkey is set ----------------------------
|
||||||
wait_for_db
|
wait_for_db
|
||||||
php -r '$connection = new PDO("mysql:host='$DB_HOST';dbname='$DB_DATABASE'", "'$DB_USERNAME'", "'$DB_PASSWORD'"); $connection->query("DESCRIBE migrations");' > /dev/null || php artisan migrate --seed --force
|
php -r '$connection = new PDO("mysql:host='$DB_HOST';dbname='$DB_DATABASE'", "'$DB_USERNAME'", "'$DB_PASSWORD'"); $connection->query("DESCRIBE migrations");' > /dev/null || ( php artisan migrate --seed --force && php artisan db:seed )
|
||||||
su www-data -c 'php artisan migrate --force'
|
su www-data -c 'php artisan migrate --force'
|
||||||
php artisan scout:sync-index-settings
|
php artisan scout:sync-index-settings
|
||||||
php-fpm -F -R -O
|
php-fpm -F -R -O
|
||||||
|
|
Loading…
Reference in New Issue