-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
59 lines (44 loc) · 1.61 KB
/
Dockerfile
File metadata and controls
59 lines (44 loc) · 1.61 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
# Multi-stage Dockerfile for Stats Agent Team
# Builds all agents and runs them with Eino orchestration
# Stage 1: Build all agents
FROM golang:1.25-alpine AS builder
# Install build dependencies
RUN apk add --no-cache git make
# Set working directory
WORKDIR /build
# Copy go mod files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build all agents
RUN go build -o /build/bin/research agents/research/main.go && \
go build -o /build/bin/synthesis agents/synthesis/main.go && \
go build -o /build/bin/verification agents/verification/main.go && \
go build -o /build/bin/orchestration-eino agents/orchestration-eino/main.go
# Stage 2: Create runtime image
FROM alpine:latest
# Install runtime dependencies
RUN apk add --no-cache ca-certificates
# Create app directory
WORKDIR /app
# Copy binaries from builder
COPY --from=builder /build/bin/research /app/research
COPY --from=builder /build/bin/synthesis /app/synthesis
COPY --from=builder /build/bin/verification /app/verification
COPY --from=builder /build/bin/orchestration-eino /app/orchestration-eino
# Copy startup script
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
RUN chmod +x /app/docker-entrypoint.sh
# Expose ports
# Research agent: 8001
# Verification agent: 8002
# Eino orchestration agent: 8003
# Synthesis agent: 8004
EXPOSE 8001 8002 8003 8004
# Health check for orchestration agent
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8003/health || exit 1
# Run all agents
ENTRYPOINT ["/app/docker-entrypoint.sh"]