Files
oauth/docker/php/entrypoint.sh
Josep Piguillem c2b5291a74 Initial commit: OAuth IAM Laravel application
Laravel-based OAuth/IAM service with Passport, Vue 3 frontend, and
Docker Compose setup for local and production deployment.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-26 01:02:41 +02:00

25 lines
646 B
Bash

#!/bin/sh
set -e
cd /var/www/html
if [ "$CONTAINER_ROLE" = "app" ]; then
chown -R www-data:www-data storage bootstrap/cache
if [ ! -f storage/oauth-private.key ]; then
echo "Generando claves de Passport (primer arranque)..."
su-exec www-data php artisan passport:keys
fi
echo "Aplicando migraciones..."
su-exec www-data php artisan migrate --force
echo "Cacheando configuración, rutas y vistas..."
su-exec www-data php artisan config:cache
su-exec www-data php artisan route:cache
su-exec www-data php artisan view:cache
su-exec www-data php artisan l5-swagger:generate
fi
exec "$@"