moll.re/frontend/Dockerfile
2024-02-08 14:52:00 +01:00

23 lines
533 B
Docker

FROM docker.io/oven/bun as base
# install dependencies into temp directory
FROM base AS install
WORKDIR /modules
COPY package.json bun.lockb ./
COPY src ./src
RUN bun install --frozen-lockfile --production
RUN bun run tailwind:build
# copy production dependencies and source code into final image
FROM base AS release
WORKDIR /usr/src/app
COPY --from=install /modules/node_modules node_modules
COPY --from=install /modules/public public
COPY src .
# run the app
USER bun
EXPOSE 3000/tcp
ENTRYPOINT [ "bun", "run", "index.tsx" ]