chore(docker): disable railway pnpm cache

This commit is contained in:
RainbowBird
2026-03-28 02:25:44 +08:00
committed by RainbowBird
parent bce1405b79
commit a64e67e0ff
3 changed files with 9 additions and 12 deletions
+1 -4
View File
@@ -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/<service id>-<target path>,target=<target path>
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
@@ -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<void> {
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')
})
+4 -4
View File
@@ -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<void> {
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<void> {
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)