bep40 commited on
Commit
341273d
·
verified ·
1 Parent(s): 351f9a2

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Single container: Bun serves the bundled front-end AND the /api/session
2
+ # proxy. HF Spaces (sdk: docker) routes traffic to app_port, set to 7860.
3
+ FROM oven/bun:1
4
+
5
+ WORKDIR /app
6
+
7
+ COPY package.json bun.lock ./
8
+ RUN bun install --frozen-lockfile --production
9
+
10
+ COPY . .
11
+
12
+ ENV NODE_ENV=production
13
+ ENV PORT=7860
14
+ # Point at a speech-to-speech backend by setting ONE of these in the Space
15
+ # settings (index.ts prefers LOAD_BALANCER_URL):
16
+ # LOAD_BALANCER_URL a load balancer's base URL (a secret) — talks to the pool directly
17
+ # SESSION_PROXY_URL another deployment's /api to piggyback (e.g. a public demo Space)
18
+ # With neither set, the app runs in direct mode (paste a ws:// URL in Settings).
19
+
20
+ EXPOSE 7860
21
+
22
+ USER bun
23
+
24
+ CMD ["bun", "index.ts"]