cobalt / Dockerfile
orztv
update
79622ac
raw
history blame
679 Bytes
ARG API_URL=https://fuliai-cobalt.hf.space/
ARG API_PORT=7860
FROM node:20-bullseye-slim AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
FROM base AS build
WORKDIR /app
COPY . /app
RUN corepack enable
RUN apt-get update && \
apt-get install -y python3 build-essential
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
ENV API_URL=${API_URL}
ENV API_PORT=${API_PORT}
ENV API_NAME=local
ENV CORS_WILDCARD=0
WORKDIR /app
COPY --from=build /prod/api /app
COPY --from=build /app/.git /app/.git
EXPOSE $API_PORT
CMD [ "node", "src/cobalt" ]