cfahlgren1 HF staff commited on
Commit
788d228
1 Parent(s): f1da626

add app port

Browse files
Files changed (3) hide show
  1. Dockerfile +8 -8
  2. README.md +1 -0
  3. bun.lockb +0 -0
Dockerfile CHANGED
@@ -1,22 +1,22 @@
1
- FROM oven/bun:1 AS build
2
 
3
  WORKDIR /app
4
 
5
  COPY . .
6
- RUN bun install
7
- RUN bun run build
8
 
9
- FROM oven/bun:1-slim AS run
10
  WORKDIR /app
11
 
12
  COPY --from=build /app/package.json .
13
- COPY --from=build /app/bun.lockb .
14
  COPY --from=build /app/build ./build
15
 
16
- RUN bun install
17
 
18
- USER bun
19
 
20
  EXPOSE 3000
21
 
22
- CMD ["bun", "./build/index.js"]
 
1
+ FROM node:20-alpine AS build
2
 
3
  WORKDIR /app
4
 
5
  COPY . .
6
+ RUN npm ci
7
+ RUN npm run build
8
 
9
+ FROM node:20-alpine AS run
10
  WORKDIR /app
11
 
12
  COPY --from=build /app/package.json .
13
+ COPY --from=build /app/package-lock.json .
14
  COPY --from=build /app/build ./build
15
 
16
+ RUN npm ci --production
17
 
18
+ USER node
19
 
20
  EXPOSE 3000
21
 
22
+ CMD ["node", "./build/index.js"]
README.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: purple
5
  colorTo: green
6
  sdk: docker
7
  pinned: true
 
8
  ---
9
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
10
 
 
5
  colorTo: green
6
  sdk: docker
7
  pinned: true
8
+ app_port: 3000
9
  ---
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
11
 
bun.lockb DELETED
Binary file (145 kB)