p3rc03 commited on
Commit
0df41e5
Β·
verified Β·
1 Parent(s): 84ee7f9

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +10 -16
dockerfile CHANGED
@@ -1,21 +1,15 @@
1
- # ─────────────────────────────────────────────────────────────────────────────
2
- # Option A: Use the official Bun image
3
- # ─────────────────────────────────────────────────────────────────────────────
4
- FROM jarredsumner/bun:latest
5
-
6
- # set working directory
7
  WORKDIR /app
8
-
9
- # copy lockfile and install deps
10
- COPY bun.lockb .
11
- COPY components.json .
12
- RUN bun install
13
-
14
- # copy rest of the source
15
  COPY . .
 
16
 
17
- # expose the port your app listens on
 
 
 
 
18
  EXPOSE 3000
 
19
 
20
- # start the app (adjust if your start script is different)
21
- CMD ["bun", "run", "start"]
 
1
+ FROM node:18-alpine AS builder
 
 
 
 
 
2
  WORKDIR /app
3
+ COPY package.json package-lock.json ./
4
+ RUN npm ci
 
 
 
 
 
5
  COPY . .
6
+ RUN npm run build
7
 
8
+ FROM node:18-alpine AS runner
9
+ WORKDIR /app
10
+ # install a simple static server
11
+ RUN npm install -g serve
12
+ COPY --from=builder /app/dist ./dist
13
  EXPOSE 3000
14
+ CMD ["serve", "-s", "dist", "-l", "3000"]
15