From 802e50378ffd4741f32b68f95633795b350282bf Mon Sep 17 00:00:00 2001 From: Mohammad Hariri Date: Tue, 21 Apr 2026 23:22:02 +0200 Subject: [PATCH] fix: update Dockerfile for production deployment --- Dockerfile | 11 +++++++---- package.json | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7461e5d..30f55c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,15 @@ -# Stage 1 — deps + build -FROM oven/bun:1 AS builder +# Stage 1 — install deps & build +FROM oven/bun:1.2 AS builder WORKDIR /app COPY package.json bun.lock ./ -RUN bun install --frozen-lockfile +RUN bun install COPY . . + +ARG STRAPI_URL=https://strapi.moshariri.com +ENV STRAPI_URL=$STRAPI_URL + RUN bun run build # Stage 2 — production runtime @@ -15,7 +19,6 @@ WORKDIR /app COPY --from=builder /app/.output ./.output EXPOSE 3000 - ENV NODE_ENV=production CMD ["node", ".output/server/index.mjs"] diff --git a/package.json b/package.json index e6f79d3..9a4047f 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "scripts": { "dev": "vite dev --port 3000", "build": "vite build", + "start": "node .output/server/index.mjs", "preview": "vite preview", "test": "vitest run", "lint": "eslint", @@ -53,4 +54,4 @@ "lightningcss" ] } -} \ No newline at end of file +}