From c1f059a25c8fd970048374b38b6aa1f6a649da6f Mon Sep 17 00:00:00 2001 From: Ash Svitan Date: Thu, 15 Jan 2026 14:03:52 +0100 Subject: [PATCH] :whale: Dockerizes app --- Dockerfile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ac4e05a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# 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 package.json bun.lock* ./ + +# use ignore-scripts to avoid building node modules like better-sqlite3 +RUN bun install --frozen-lockfile --ignore-scripts + +# Copy the entire project +COPY . . + +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" ]