Skip to content

Commit

Permalink
Merge pull request #602 from dbarzin/dev
Browse files Browse the repository at this point in the history
fix migration issue in docker
  • Loading branch information
dbarzin authored Jan 22, 2024
2 parents ce2f93b + d3be5ee commit 8771fb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ nodaemon=true

[program:migrate]
command=/bin/sh -c '
php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
if [ ! -s ${DB_DATABASE} ];
then
touch ${DB_DATABASE} && chmod a+x ${DB_DATABASE} &&
(php artisan migrate --force || true) &&
(php artisan db:seed --force && php artisan passport:install || true);
(php artisan migrate --force) &&
(php artisan db:seed --force && php artisan passport:install);
else
(php artisan migrate --force || true);
php artisan migrate;
fi;
touch /tmp/migrated'
autorestart=false
Expand Down

0 comments on commit 8771fb4

Please sign in to comment.