Files
classroomio/docker/Dockerfile.api
T
1ed12622ab fix(dashboard): fix build error for analytics traffic chart (#931)
* convert areachart to working barchart in trend-chart.svelte and fixed empty data issue on browser reload stats/ pages

* fix: remove `patches` copy script from dockerfiles as patches no longer exist, to allow build

---------

Co-authored-by: richarddkenneth <richard-kenneth@users.noreply.github.com>
Co-authored-by: Rotimi Best <best@classroomio.com>
2026-08-19 10:07:01 +01:00

33 lines
859 B
Docker

FROM node:20.19.3-slim
WORKDIR /app
# Keep install non-interactive and deterministic in CI/container contexts.
ENV CI=true
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable && corepack prepare pnpm@10.19.0 --activate
# Fetch deps from the lockfile first (cached unless pnpm-lock.yaml changes); the
# store is baked into this layer and reused by the offline install below.
COPY pnpm-lock.yaml ./
RUN pnpm fetch --store-dir /pnpm/store
COPY . .
RUN pnpm install --offline --frozen-lockfile --ignore-scripts --shamefully-hoist \
--store-dir /pnpm/store --filter @cio/api...
RUN find . -name 'tsconfig.tsbuildinfo' -delete
RUN pnpm -r --filter @cio/api... build
COPY docker/entrypoint-api.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
EXPOSE 3081
ENV NODE_ENV=production \
PORT=3081
ENTRYPOINT ["/app/entrypoint.sh"]