feat: add database schema support for gateway and game profiles

- Introduced `dbSchema` configuration option in GatewayApiConfig and GatewayOrchestratorConfig.
- Implemented schema resolution logic in environment configuration functions.
- Updated context and orchestrator factory to use GatewayPrismaClient instead of PrismaClient.
- Refactored orchestrator server and profile repository to accommodate new database schema handling.
- Created separate Prisma schemas for game and gateway in the infra package.
- Enhanced Postgres connector to support schema overrides in database URLs.
- Updated documentation to reflect changes in database schema handling.
- Added new Prisma generation and database push scripts for game and gateway schemas.
This commit is contained in:
2026-01-03 14:47:28 +00:00
parent 67d995c65f
commit a9609dcc19
33 changed files with 388 additions and 158 deletions
+4 -1
View File
@@ -4,7 +4,9 @@ POSTGRES_PORT=15432
POSTGRES_DB=sammo
POSTGRES_USER=sammo
POSTGRES_PASSWORD=change-me
# POSTGRES_SCHEMA=public
# DATABASE_URL=postgresql://sammo:change-me@127.0.0.1:15432/sammo?schema=public
# GATEWAY_DATABASE_URL=postgresql://sammo:change-me@127.0.0.1:15432/sammo?schema=public
# Redis
REDIS_HOST=127.0.0.1
@@ -21,6 +23,7 @@ GATEWAY_API_HOST=0.0.0.0
GATEWAY_API_PORT=13000
GATEWAY_PUBLIC_URL=http://localhost:13000
GATEWAY_REDIS_PREFIX=sammo:gateway
GATEWAY_DB_SCHEMA=public
SESSION_TTL_SECONDS=604800
GAME_SESSION_TTL_SECONDS=21600
OAUTH_SESSION_TTL_SECONDS=600
@@ -31,7 +34,7 @@ KAKAO_REDIRECT_URI=http://localhost:13000/oauth/kakao/callback
# Game API
GAME_API_HOST=0.0.0.0
GAME_API_PORT=14000
PROFILE=che
PROFILE=hwe
SCENARIO=default
DAEMON_REQUEST_TIMEOUT_MS=5000
TRPC_PATH=/trpc