-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 827 Bytes
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ---- deps ----
FROM oven/bun:1 AS deps
WORKDIR /app
# Install deps (cache-friendly)
COPY package.json bun.lockb* ./
RUN bun install --frozen-lockfile
# ---- build ----
FROM oven/bun:1 AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# SvelteKit build (adapter-node => outputs /build)
RUN bun run build
# ---- run ----
FROM oven/bun:1-slim AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3000
# If you have runtime deps (not fully bundled), keep node_modules:
COPY --from=build /app/node_modules ./node_modules
# adapter-node output
COPY --from=build /app/build ./build
# (optional) if you need files like package.json for runtime metadata
COPY --from=build /app/package.json ./package.json
EXPOSE 3000
# adapter-node entrypoint
CMD ["bun", "build/index.js"]