-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (32 loc) · 1.06 KB
/
Dockerfile
File metadata and controls
44 lines (32 loc) · 1.06 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
# Stage 1: Build static site
FROM node:24-alpine AS builder
WORKDIR /app
ARG SITE_BASE_URL=https://coding.tools
ENV SITE_BASE_URL=$SITE_BASE_URL
# Install dependencies
COPY package.json package-lock.json ./
RUN npm ci
# Copy source files
COPY .eleventy.js ./
COPY scripts/ scripts/
COPY server/ server/
COPY skills/ skills/
COPY src/ src/
# Build static site
RUN npm run build
# Stage 2: Serve static files with nginx and run the A2A runtime
FROM node:24-alpine
RUN apk add --no-cache nginx
WORKDIR /app
ARG SITE_BASE_URL=https://coding.tools
ENV SITE_BASE_URL=$SITE_BASE_URL
# Copy runtime files and built static files
COPY server/ server/
COPY src/_data/ src/_data/
COPY scripts/docker-entrypoint.sh scripts/docker-entrypoint.sh
COPY docker/nginx.conf /etc/nginx/http.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
RUN mkdir -p /run/nginx
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD wget -q -O /dev/null http://127.0.0.1/ && wget -q -O /dev/null http://127.0.0.1/a2a/healthz || exit 1
CMD ["sh", "/app/scripts/docker-entrypoint.sh"]