fix(server): dockerfile & railway fix
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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,6 +1,6 @@
|
||||
[build]
|
||||
builder = "DOCKERFILE"
|
||||
dockerfilePath = "apps/server/Dockerfile"
|
||||
dockerfilePath = "/apps/server/production/railway/Dockerfile"
|
||||
watchPatterns = [
|
||||
"apps/server/**",
|
||||
"packages/**",
|
||||
|
||||
Reference in New Issue
Block a user