forked from iOfficeAI/AionUi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 823 Bytes
/
Dockerfile
File metadata and controls
37 lines (28 loc) · 823 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
FROM node:20-slim AS builder
WORKDIR /app
# Install bun
RUN npm install -g bun
# Install all dependencies (including devDeps for build)
COPY package.json bun.lockb ./
RUN bun install
# Copy source
COPY . .
# Build renderer (no Electron needed) and server bundle
RUN bun run build:renderer:web
RUN node scripts/build-server.mjs
# ---- Runtime image ----
FROM oven/bun:latest AS runtime
WORKDIR /app
# Copy only build artifacts and production deps
COPY --from=builder /app/dist-server ./dist-server
COPY --from=builder /app/out/renderer ./out/renderer
COPY package.json bun.lockb ./
RUN bun install --production
ENV PORT=3000
ENV NODE_ENV=production
ENV ALLOW_REMOTE=true
ENV DATA_DIR=/data
# SQLite data volume — mount with: -v $(pwd)/data:/data
VOLUME ["/data"]
EXPOSE 3000
CMD ["bun", "dist-server/server.mjs"]