diff --git a/docker-compose.yml b/docker-compose.yml index 79aa96a6..9cfe2442 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -18,6 +18,9 @@ services: restart: unless-stopped environment: - RUN_MIGRATIONS=true + - RUN_SEEDER=true + - ADMIN_EMAIL=${ADMIN_EMAIL:-admin@example.com} + - ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin123} postgres: container_name: tckdev-db diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 18c1d454..f861ebc4 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -21,12 +21,16 @@ if [ ! -d "public/build" ] && [ -f "vite.config.js" ]; then npm run build || true fi -php artisan config:cache 2>/dev/null || true -php artisan route:cache 2>/dev/null || true -php artisan view:cache 2>/dev/null || true - if [ "$RUN_MIGRATIONS" = "true" ]; then php artisan migrate --force || true fi +if [ "$RUN_SEEDER" = "true" ]; then + php artisan db:seed --force 2>/dev/null || true +fi + +php artisan config:cache 2>/dev/null || true +php artisan route:cache 2>/dev/null || true +php artisan view:cache 2>/dev/null || true + exec "$@"