dockge/docker/Dockerfile

30 lines
870 B
Text
Raw Normal View History

2023-11-10 10:16:52 +00:00
############################################
# Build
############################################
FROM louislam/dockge:base AS build
WORKDIR /app
COPY --chown=node:node ./package.json ./package.json
COPY --chown=node:node ./pnpm-lock.yaml ./pnpm-lock.yaml
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
2023-11-06 13:24:06 +00:00
############################################
# ⭐ Main Image
############################################
2023-11-06 14:54:20 +00:00
FROM louislam/dockge:base AS release
2023-10-23 11:30:58 +00:00
WORKDIR /app
2023-10-26 05:23:45 +00:00
COPY --chown=node:node . .
2023-11-10 10:16:52 +00:00
COPY --from=build /app/node_modules /app/node_modules
RUN mkdir ./data
2023-11-06 14:54:20 +00:00
2023-10-26 05:23:45 +00:00
VOLUME /app/data
EXPOSE 5001
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["tsx", "./backend/index.ts"]
2023-11-06 13:24:06 +00:00
############################################
# Mark as Nightly
############################################
FROM release AS nightly
RUN pnpm run mark-as-nightly