feat: 환경 변수에 GAME_TRPC_PATH 및 GATEWAY_TRPC_PATH 추가, 관련 문서 업데이트
This commit is contained in:
@@ -28,7 +28,7 @@ export const resolveGameApiConfigFromEnv = (env: NodeJS.ProcessEnv = process.env
|
|||||||
return {
|
return {
|
||||||
host: env.GAME_API_HOST ?? '0.0.0.0',
|
host: env.GAME_API_HOST ?? '0.0.0.0',
|
||||||
port: parseNumberWithFallback(env.GAME_API_PORT, 14000, 'GAME_API_PORT'),
|
port: parseNumberWithFallback(env.GAME_API_PORT, 14000, 'GAME_API_PORT'),
|
||||||
trpcPath: env.TRPC_PATH ?? '/trpc',
|
trpcPath: env.GAME_TRPC_PATH ?? env.TRPC_PATH ?? '/trpc',
|
||||||
eventsPath: env.GAME_API_EVENTS_PATH ?? '/events',
|
eventsPath: env.GAME_API_EVENTS_PATH ?? '/events',
|
||||||
profile,
|
profile,
|
||||||
scenario,
|
scenario,
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export const resolveGatewayApiConfigFromEnv = (env: NodeJS.ProcessEnv = process.
|
|||||||
return {
|
return {
|
||||||
host: env.GATEWAY_API_HOST ?? '0.0.0.0',
|
host: env.GATEWAY_API_HOST ?? '0.0.0.0',
|
||||||
port: parseNumberWithFallback(env.GATEWAY_API_PORT, 13000, 'GATEWAY_API_PORT'),
|
port: parseNumberWithFallback(env.GATEWAY_API_PORT, 13000, 'GATEWAY_API_PORT'),
|
||||||
trpcPath: env.TRPC_PATH ?? '/trpc',
|
trpcPath: env.GATEWAY_TRPC_PATH ?? env.TRPC_PATH ?? '/trpc',
|
||||||
dbSchema: resolveSchemaName(env.GATEWAY_DB_SCHEMA),
|
dbSchema: resolveSchemaName(env.GATEWAY_DB_SCHEMA),
|
||||||
redisKeyPrefix,
|
redisKeyPrefix,
|
||||||
flushChannel: `${redisKeyPrefix}:flush`,
|
flushChannel: `${redisKeyPrefix}:flush`,
|
||||||
|
|||||||
@@ -46,6 +46,9 @@ Minimum environment variables for the test:
|
|||||||
- `GATEWAY_REDIS_PREFIX` (optional but recommended to isolate keys)
|
- `GATEWAY_REDIS_PREFIX` (optional but recommended to isolate keys)
|
||||||
- `GATEWAY_WORKSPACE_ROOT` (workspace root with built `dist/`)
|
- `GATEWAY_WORKSPACE_ROOT` (workspace root with built `dist/`)
|
||||||
- `GATEWAY_WORKTREE_ROOT` (worktree root for builds; can be temp)
|
- `GATEWAY_WORKTREE_ROOT` (worktree root for builds; can be temp)
|
||||||
|
- `GATEWAY_TRPC_PATH` (e.g. `/gateway/api/trpc`)
|
||||||
|
- `GAME_TRPC_PATH` (e.g. `/che/api/trpc`)
|
||||||
|
- `GAME_API_EVENTS_PATH` (e.g. `/che/api/events`)
|
||||||
|
|
||||||
For profile alignment:
|
For profile alignment:
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ The test runs real Postgres and Redis, and talks to the API servers via tRPC.
|
|||||||
- `GAME_TOKEN_SECRET`, `KAKAO_REST_KEY`, `KAKAO_REDIRECT_URI`
|
- `GAME_TOKEN_SECRET`, `KAKAO_REST_KEY`, `KAKAO_REDIRECT_URI`
|
||||||
- `GATEWAY_BOOTSTRAP_TOKEN`
|
- `GATEWAY_BOOTSTRAP_TOKEN`
|
||||||
- `GATEWAY_API_HOST`, `GATEWAY_API_PORT`, `GAME_API_HOST`, `GAME_API_PORT`
|
- `GATEWAY_API_HOST`, `GATEWAY_API_PORT`, `GAME_API_HOST`, `GAME_API_PORT`
|
||||||
|
- `GATEWAY_TRPC_PATH`, `GAME_TRPC_PATH`, `GAME_API_EVENTS_PATH`
|
||||||
- `PROFILE=che`, `SCENARIO=2`
|
- `PROFILE=che`, `SCENARIO=2`
|
||||||
- `pnpm install` and `pnpm build` have already completed.
|
- `pnpm install` and `pnpm build` have already completed.
|
||||||
|
|
||||||
|
|||||||
@@ -418,8 +418,9 @@ describe('pm2 orchestrator e2e', () => {
|
|||||||
const adminSessionRef: { value?: string } = {};
|
const adminSessionRef: { value?: string } = {};
|
||||||
const accessTokenRef: { value?: string } = {};
|
const accessTokenRef: { value?: string } = {};
|
||||||
const gatewayClient = createGatewayClient(gatewayUrl, gatewayServer.config.trpcPath, adminSessionRef);
|
const gatewayClient = createGatewayClient(gatewayUrl, gatewayServer.config.trpcPath, adminSessionRef);
|
||||||
const gameClientPublic = createGameClient(gameUrl, process.env.TRPC_PATH ?? '/trpc', { value: undefined });
|
const gameTrpcPath = process.env.GAME_TRPC_PATH ?? process.env.TRPC_PATH ?? '/trpc';
|
||||||
const gameClientAuthed = createGameClient(gameUrl, process.env.TRPC_PATH ?? '/trpc', accessTokenRef);
|
const gameClientPublic = createGameClient(gameUrl, gameTrpcPath, { value: undefined });
|
||||||
|
const gameClientAuthed = createGameClient(gameUrl, gameTrpcPath, accessTokenRef);
|
||||||
|
|
||||||
const bootstrap = await gatewayClient.auth.bootstrapLocal.mutate({
|
const bootstrap = await gatewayClient.auth.bootstrapLocal.mutate({
|
||||||
token: bootstrapToken,
|
token: bootstrapToken,
|
||||||
|
|||||||
Reference in New Issue
Block a user