diff --git a/services/frontend/Dockerfile b/services/frontend/Dockerfile new file mode 100644 index 0000000..1285a75 --- /dev/null +++ b/services/frontend/Dockerfile @@ -0,0 +1,17 @@ +# Stage 1: Build the Vite app using Bun +FROM oven/bun:latest AS builder + +WORKDIR /app + +COPY package.json bun.lock ./ +RUN bun install --frozen-lockfile + +COPY . . +RUN npm run build + +# Stage 2: Serve the built files with Nginx +FROM nginx:latest + +COPY --from=builder /app/dist /usr/share/nginx/html + +CMD ["nginx", "-g", "daemon off;"] diff --git a/services/frontend/package.json b/services/frontend/package.json index 59286e8..8e5e061 100644 --- a/services/frontend/package.json +++ b/services/frontend/package.json @@ -5,8 +5,8 @@ "type": "module", "scripts": { "dev": "vite --host", - "build": "tsc -b && vite build", - "lint": "eslint .", + "build": "vite build", + "lint": "eslint . && tsc -b", "preview": "vite preview" }, "dependencies": {