-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 1011 Bytes
/
Dockerfile
File metadata and controls
31 lines (23 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM node:24-alpine AS build
WORKDIR /repo
# Use pnpm via corepack (Node >=16). Pinning pnpm version is handled by packageManager in package.json.
RUN corepack enable
# Workspace manifests (required: build context must be repo root)
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
COPY tsconfig.base.json tsconfig.json ./
COPY scripts/bundle-package.ts ./scripts/bundle-package.ts
COPY packages/core ./packages/core
COPY packages/dsl ./packages/dsl
COPY packages/resources ./packages/resources
COPY packages/server ./packages/server
RUN pnpm install --frozen-lockfile
RUN pnpm -C packages/server build
RUN mkdir -p /out && cp -R /repo/packages/server/dist /out/dist && cp /repo/packages/server/package.json /out/package.json
FROM node:24-alpine AS run
WORKDIR /app
ENV NODE_ENV=production
# Ensure Node treats dist/*.js as ESM.
COPY --from=build /out/package.json ./package.json
COPY --from=build /out/dist ./dist
EXPOSE 8080
CMD ["node", "./dist/bin.js", "--host", "0.0.0.0", "--port", "8080"]