bot-api/Dockerfile

19 lines
449 B
Docker

FROM oven/bun:1 as base
WORKDIR /usr/src/app
FROM base AS install
RUN mkdir -p /temp/prod
COPY package.json bun.lockb /temp/prod/
RUN cd /temp/prod && bun install --production --frozen-lockfile
FROM base AS release
COPY --from=install /temp/prod/node_modules node_modules
COPY --from=install /temp/prod/package.json .
COPY ./src ./src
USER bun
ENV NODE_ENV production
EXPOSE 8080/tcp
ENTRYPOINT [ "/bin/bash", "-c" ]
CMD ["bun run src/index.ts"]