Files
growqr-backend/Dockerfile
2026-06-22 21:25:38 +00:00

32 lines
901 B
Docker

FROM node:22-alpine AS base
WORKDIR /app
FROM base AS deps
RUN corepack enable && corepack prepare pnpm@10.24.0 --activate
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
FROM base AS build
COPY --from=deps /app/node_modules ./node_modules
COPY tsconfig.json ./
COPY src ./src
RUN ./node_modules/.bin/tsc -p tsconfig.json
FROM base AS runtime
ARG RIVET_RUNNER_VERSION=dev
ENV NODE_ENV=production
ENV RIVET_RUNNER_VERSION=$RIVET_RUNNER_VERSION
COPY --from=deps /app/node_modules ./node_modules
COPY --from=build /app/dist ./dist
COPY package.json ./
COPY drizzle/ ./drizzle/
# ── Build-time prompt loading (changes.md §3) ──
# Prompts and agent definitions are copied into the image so they are
# embedded at build time. To update: edit files → rebuild image → rollout.
COPY prompts/ ./prompts/
COPY agents/ ./agents/
EXPOSE 4000
CMD ["node", "dist/index.js"]