25 lines
551 B
Docker
25 lines
551 B
Docker
FROM node:20.19.3-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Keep install non-interactive and deterministic in CI/container contexts.
|
|
ENV CI=true
|
|
|
|
RUN corepack enable && corepack prepare [email protected] --activate
|
|
|
|
COPY . .
|
|
|
|
RUN pnpm install --frozen-lockfile --ignore-scripts --shamefully-hoist --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"]
|