Files
tranga-website/Dockerfile
2025-10-10 20:13:29 +02:00

26 lines
657 B
Docker

# use the official Bun image
# see all versions at https://hub.docker.com/r/oven/bun/tags
FROM oven/bun:1 AS build
WORKDIR /app
COPY website/package.json bun.lock* ./
# use ignore-scripts to avoid builting node modules like better-sqlite3
RUN bun install --frozen-lockfile --ignore-scripts
# Copy the entire project
COPY website/* .
RUN bun --bun run build
# copy production dependencies and source code into final image
FROM oven/bun:1 AS production
WORKDIR /app
# Only `.output` folder is needed from the build stage
COPY --from=build /app/.output /app
# run the app
EXPOSE 3000/tcp
ENTRYPOINT [ "bun", "--bun", "run", "/app/server/index.mjs" ]