-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.compiler-node
More file actions
26 lines (23 loc) · 941 Bytes
/
Copy pathDockerfile.compiler-node
File metadata and controls
26 lines (23 loc) · 941 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
FROM node:22.14.0-bookworm-slim AS base
RUN corepack enable && corepack prepare pnpm@10.33.0 --activate
WORKDIR /app
FROM base AS deps
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml turbo.json tsconfig.base.json ./
COPY packages ./packages
COPY apps/compiler-node ./apps/compiler-node
COPY compilers ./compilers
COPY fixtures ./fixtures
RUN pnpm install --frozen-lockfile=false
FROM deps AS build
RUN pnpm --filter @method/shared build \
&& pnpm --filter @method/canonical-json build \
&& pnpm --filter @method/methodology-schema build \
&& pnpm --filter @method/compiler build \
&& pnpm --filter @method/observability build \
&& pnpm --filter @method/compiler-node build
FROM base AS runner
ENV NODE_ENV=production
RUN apt-get update && apt-get install -y --no-install-recommends python3 && rm -rf /var/lib/apt/lists/*
COPY --from=build /app /app
WORKDIR /app
CMD ["pnpm", "--filter", "@method/compiler-node", "start", "run"]