From a64e67e0ffa66bcfcc215ff0779a888c96f9c494 Mon Sep 17 00:00:00 2001 From: RainbowBird Date: Fri, 27 Mar 2026 01:25:15 +0800 Subject: [PATCH] chore(docker): disable railway pnpm cache --- apps/server/production/railway/Dockerfile | 5 +---- apps/server/src/bin/run-billing-events-consumer.ts | 8 ++++---- apps/server/src/bin/run-outbox-dispatcher.ts | 8 ++++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/apps/server/production/railway/Dockerfile b/apps/server/production/railway/Dockerfile index 4bf46ec0b..a35cd831c 100644 --- a/apps/server/production/railway/Dockerfile +++ b/apps/server/production/railway/Dockerfile @@ -11,10 +11,7 @@ COPY packages/server-protocol packages/server-protocol COPY packages/server-schema packages/server-schema COPY packages/plugin-protocol packages/plugin-protocol -# https://docs.railway.com/guides/dockerfiles#cache-mounts -# --mount=type=cache,id=s/-,target= -RUN --mount=type=cache,id=s/fec8bf0d-37e0-4283-8202-5f1bd7e6cd0e-/root/.pnpm-store,target=/root/.pnpm-store \ - pnpm install --frozen-lockfile --ignore-scripts +RUN pnpm install --frozen-lockfile --ignore-scripts RUN pnpm -F @proj-airi/server-schema run build RUN pnpm -F @proj-airi/server-protocol run build diff --git a/apps/server/src/bin/run-billing-events-consumer.ts b/apps/server/src/bin/run-billing-events-consumer.ts index 4efc45ccf..4feb5f264 100644 --- a/apps/server/src/bin/run-billing-events-consumer.ts +++ b/apps/server/src/bin/run-billing-events-consumer.ts @@ -1,6 +1,6 @@ import type { BillingStreamMessage } from '../services/billing-mq' -import { pid } from 'node:process' +import process, { pid } from 'node:process' import { initLogger, LoggerFormat, LoggerLevel, useLogger } from '@guiiai/logg' @@ -28,7 +28,7 @@ export interface RunBillingEventsConsumerOptions { export async function runBillingEventsConsumer(options: RunBillingEventsConsumerOptions): Promise { initLogger(LoggerLevel.Debug, LoggerFormat.Pretty) - const env = parseEnv(globalThis.process.env) + const env = parseEnv(process.env) const logger = useLogger(options.loggerName).useGlobalConfig() const redis = createRedis(env.REDIS_URL) @@ -46,10 +46,10 @@ export async function runBillingEventsConsumer(options: RunBillingEventsConsumer abortController.abort() } - globalThis.process.once('SIGINT', () => { + process.once('SIGINT', () => { void shutdown('SIGINT') }) - globalThis.process.once('SIGTERM', () => { + process.once('SIGTERM', () => { void shutdown('SIGTERM') }) diff --git a/apps/server/src/bin/run-outbox-dispatcher.ts b/apps/server/src/bin/run-outbox-dispatcher.ts index b04571663..7ad3385e9 100644 --- a/apps/server/src/bin/run-outbox-dispatcher.ts +++ b/apps/server/src/bin/run-outbox-dispatcher.ts @@ -1,4 +1,4 @@ -import { pid } from 'node:process' +import process, { pid } from 'node:process' import { initLogger, LoggerFormat, LoggerLevel, useLogger } from '@guiiai/logg' @@ -21,7 +21,7 @@ function parsePositiveInteger(rawValue: string, envKey: string): number { export async function runOutboxDispatcher(): Promise { initLogger(LoggerLevel.Debug, LoggerFormat.Pretty) - const env = parseEnv(globalThis.process.env) + const env = parseEnv(process.env) const logger = useLogger('outbox-dispatcher').useGlobalConfig() const { db, pool } = createDrizzle(env.DATABASE_URL) const redis = createRedis(env.REDIS_URL) @@ -42,8 +42,8 @@ export async function runOutboxDispatcher(): Promise { abortController.abort() } - globalThis.process.once('SIGINT', () => shutdown('SIGINT')) - globalThis.process.once('SIGTERM', () => shutdown('SIGTERM')) + process.once('SIGINT', () => shutdown('SIGINT')) + process.once('SIGTERM', () => shutdown('SIGTERM')) try { const outboxService = createOutboxService(db)