-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 1.01 KB
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
# ── Stage 1: Build protocol ──────────────────────────────────────────────────
FROM node:20-slim AS protocol-builder
WORKDIR /protocol
# Copy core artifacts (ABI source of truth)
COPY core/out ../core/out
# Copy protocol
COPY protocol/package*.json ./
RUN npm install
COPY protocol/src ./src
COPY protocol/script ./script
COPY protocol/tsconfig.json ./
RUN npm run build
# ── Stage 2: Frontend dev server ─────────────────────────────────────────────
FROM node:20-slim
WORKDIR /frontend
# Copy built protocol dist (no symlinks, no workspace root needed)
COPY --from=protocol-builder /protocol /protocol
# Install frontend dependencies
COPY frontend/package*.json ./
RUN npm install --legacy-peer-deps
# Copy frontend source
COPY frontend/ .
EXPOSE 5173
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"]