-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 822 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 822 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
FROM oven/bun:1 AS base
WORKDIR /app
# Install dependencies
FROM base AS deps
COPY package.json bun.lock* ./
COPY web/package.json web/bun.lock* ./web/
RUN bun install --frozen-lockfile 2>/dev/null || bun install
RUN cd web && (bun install --frozen-lockfile 2>/dev/null || bun install)
# Build frontend
FROM deps AS build-web
COPY web/ ./web/
RUN cd web && bun run build
# Production image
FROM base AS runner
COPY package.json bun.lock* ./
RUN bun install --production --frozen-lockfile 2>/dev/null || bun install --production
COPY src/ ./src/
COPY --from=build-web /app/web/dist ./web/dist
# Create data directory
RUN mkdir -p /app/data
ENV NODE_ENV=production
ENV PORT=8484
ENV HOST=0.0.0.0
ENV DATA_DIR=/app/data
EXPOSE 8484
VOLUME ["/app/data", "/app/custom-integrations"]
CMD ["bun", "run", "src/index.ts"]