-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (24 loc) · 1.1 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (24 loc) · 1.1 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
37
38
39
40
# syntax = docker/dockerfile:1
FROM oven/bun:1 AS base
LABEL fly_launch_runtime="Bun"
WORKDIR /app
ENV NODE_ENV="production"
# ── Build stage ───────────────────────────────────────────────────────────────
FROM base AS build
# Install frontend deps and build static assets
COPY frontend/package.json frontend/bun.lock* ./frontend/
RUN bun install --cwd frontend
COPY frontend ./frontend
RUN bun run --cwd frontend build
# Install backend deps
COPY backend/package.json backend/bun.lock* ./backend/
RUN bun install --cwd backend
COPY backend ./backend
# ── Final stage ───────────────────────────────────────────────────────────────
FROM base
# Copy built application
COPY --from=build /app /app
# Uploads dir for temporary PDF processing (multer writes relative to CWD /app)
RUN mkdir -p /app/uploads
EXPOSE 8080
CMD ["bun", "backend/server.ts"]