fix(server): dockerfile & railway fix

This commit is contained in:
Neko Ayaka
2026-01-05 16:26:44 +08:00
committed by RainbowBird
parent 8cbdb6be2e
commit ca45b0dfb6
3 changed files with 24 additions and 1 deletions
+6
View File
@@ -24,7 +24,13 @@ services:
db:
condition: service_healthy
environment:
# Database
- DATABASE_URL=postgresql://postgres:example-P@ssw0rd-xHjDYR.b7N@db:5432/postgres
# Auth
- AUTH_GOOGLE_CLIENT_ID
- AUTH_GOOGLE_CLIENT_SECRET
- AUTH_GITHUB_CLIENT_ID
- AUTH_GITHUB_CLIENT_SECRET
ports:
- '6112:3000'
healthcheck:
+17
View File
@@ -0,0 +1,17 @@
FROM node:24-alpine
WORKDIR /app
RUN corepack enable
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
COPY apps/server apps/server
# 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/cf17b143-327a-4f8e-bb34-27ca77380109-/root/.pnpm-store,target=/root/.pnpm-store \
pnpm install --frozen-lockfile --ignore-scripts
EXPOSE 3000
CMD ["pnpm", "-F", "@proj-airi/api-server", "start"]
+1 -1
View File
@@ -1,6 +1,6 @@
[build]
builder = "DOCKERFILE"
dockerfilePath = "apps/server/Dockerfile"
dockerfilePath = "/apps/server/production/railway/Dockerfile"
watchPatterns = [
"apps/server/**",
"packages/**",