bot-api/Dockerfile

19 lines
449 B
Docker
Raw Permalink Normal View History

2023-12-08 13:05:20 +00:00
FROM oven/bun:1 as base
WORKDIR /usr/src/app
FROM base AS install
RUN mkdir -p /temp/prod
2024-04-20 10:39:35 +00:00
COPY package.json bun.lockb /temp/prod/
RUN cd /temp/prod && bun install --production --frozen-lockfile
2023-12-08 13:05:20 +00:00
FROM base AS release
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=install /temp/prod/package.json .
COPY ./src ./src
2023-12-08 13:05:20 +00:00
USER bun
ENV NODE_ENV production
EXPOSE 8080/tcp
2024-04-15 17:05:27 +00:00
ENTRYPOINT [ "/bin/bash", "-c" ]
CMD ["bun run src/index.ts"]