-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile.website
More file actions
78 lines (58 loc) · 3 KB
/
Dockerfile.website
File metadata and controls
78 lines (58 loc) · 3 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# =============================================================================
# Agentver — Website Docker Image
# =============================================================================
# Multi-stage build for the monorepo. Produces a container running the Next.js
# marketing website (port 3000).
# =============================================================================
# ---------------------------------------------------------------------------
# Stage 1: base — shared Alpine image with Bun
# ---------------------------------------------------------------------------
FROM oven/bun:1.3-alpine AS base
RUN apk add --no-cache libc6-compat python3 make g++
# ---------------------------------------------------------------------------
# Stage 2: deps — install all workspace dependencies
# ---------------------------------------------------------------------------
FROM base AS deps
WORKDIR /app
COPY package.json bun.lock turbo.json ./
COPY apps/desktop/package.json ./apps/desktop/package.json
COPY apps/dashboard/package.json ./apps/dashboard/package.json
COPY apps/website/package.json ./apps/website/package.json
COPY packages/agent-definitions/package.json ./packages/agent-definitions/package.json
COPY packages/cli/package.json ./packages/cli/package.json
COPY packages/database/package.json ./packages/database/package.json
COPY packages/github-action/package.json ./packages/github-action/package.json
COPY packages/mcp-server/package.json ./packages/mcp-server/package.json
COPY packages/shared/package.json ./packages/shared/package.json
COPY packages/typescript-config/package.json ./packages/typescript-config/package.json
COPY packages/ui/package.json ./packages/ui/package.json
COPY packages/ui-utils/package.json ./packages/ui-utils/package.json
RUN bun install --frozen-lockfile
# ---------------------------------------------------------------------------
# Stage 3: build — compile the website with Turborepo
# ---------------------------------------------------------------------------
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/ ./
COPY . .
ENV NODE_ENV=production
RUN bun run turbo build --filter=@agentver/website
# ---------------------------------------------------------------------------
# Stage 4: runner — slim production image
# ---------------------------------------------------------------------------
FROM node:24-slim AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV HOSTNAME="0.0.0.0"
RUN apt-get update && \
apt-get install -y --no-install-recommends tini && \
rm -rf /var/lib/apt/lists/*
RUN groupadd --system --gid 1001 agentver && \
useradd --system --uid 1001 --gid agentver agentver
COPY --from=builder --chown=agentver:agentver /app/apps/website/.next/standalone ./
COPY --from=builder --chown=agentver:agentver /app/apps/website/.next/static ./apps/website/.next/static
COPY --from=builder --chown=agentver:agentver /app/apps/website/public ./apps/website/public
USER agentver
EXPOSE 3000
ENTRYPOINT ["tini", "--"]
CMD ["node", "apps/website/server.js"]