mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-27 17:08:28 +00:00

Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
27 lines
534 B
Docker
27 lines
534 B
Docker
FROM node:24-alpine AS base
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
|
|
FROM base AS build
|
|
WORKDIR /app
|
|
COPY . /app
|
|
|
|
RUN corepack enable
|
|
RUN apk add --no-cache python3 alpine-sdk
|
|
|
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
|
pnpm install --prod --frozen-lockfile
|
|
|
|
RUN pnpm deploy --filter=@imput/cobalt-api --prod /prod/api
|
|
|
|
FROM base AS api
|
|
WORKDIR /app
|
|
|
|
COPY --from=build --chown=node:node /prod/api /app
|
|
COPY --from=build --chown=node:node /app/.git /app/.git
|
|
|
|
USER node
|
|
|
|
EXPOSE 9000
|
|
CMD [ "node", "src/cobalt" ]
|