diff --git a/docker/entrypoint_alpine.sh b/docker/entrypoint_alpine.sh index cd0929885a..783b50b69c 100644 --- a/docker/entrypoint_alpine.sh +++ b/docker/entrypoint_alpine.sh @@ -45,6 +45,11 @@ then cp -a /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/ fi +if [ "${SESSION_DRIVER}" == "database" ] +then + cp -a /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub /var/www/html/database/migrations/2021_05_06_0000_create_sessions_table.php +fi + php artisan migrate --force php artisan config:clear php artisan config:cache diff --git a/docker/startup.sh b/docker/startup.sh index 6b276f117d..726aafd16b 100644 --- a/docker/startup.sh +++ b/docker/startup.sh @@ -54,6 +54,11 @@ then cp -ax /var/www/html/vendor/laravel/passport/database/migrations/* /var/www/html/database/migrations/ fi +if [ $SESSION_DRIVER = "database" ] +then + cp -ax /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Console/stubs/database.stub /var/www/html/database/migrations/2021_05_06_0000_create_sessions_table.php +fi + php artisan migrate --force php artisan config:clear php artisan config:cache