-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (42 loc) · 1.85 KB
/
Copy pathDockerfile
File metadata and controls
52 lines (42 loc) · 1.85 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
FROM python:3.12-slim AS base
# Install git (required by gitpython for cloning repos)
RUN apt-get update && apt-get install -y --no-install-recommends git && \
rm -rf /var/lib/apt/lists/*
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
WORKDIR /app
# Copy dependency files first for layer caching
COPY pyproject.toml ./
RUN uv sync --no-dev --no-install-project
# Copy source code
COPY src/ src/
# ── Orchestrator Agent ──
FROM base AS orchestrator
EXPOSE 9000
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD python -c "import socket; s=socket.create_connection(('localhost',9000),2); s.close()" || exit 1
CMD ["uv", "run", "python", "-m", "src.agents.orchestrator.server"]
# ── Indexer Agent ──
FROM base AS indexer
EXPOSE 9001
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD python -c "import socket; s=socket.create_connection(('localhost',9001),2); s.close()" || exit 1
CMD ["uv", "run", "python", "-m", "src.agents.indexer.server"]
# ── Graph Query Agent ──
FROM base AS graph-query
EXPOSE 9002
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD python -c "import socket; s=socket.create_connection(('localhost',9002),2); s.close()" || exit 1
CMD ["uv", "run", "python", "-m", "src.agents.graph_query.server"]
# ── Code Analyst Agent ──
FROM base AS code-analyst
EXPOSE 9003
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD python -c "import socket; s=socket.create_connection(('localhost',9003),2); s.close()" || exit 1
CMD ["uv", "run", "python", "-m", "src.agents.code_analyst.server"]
# ── Gateway ──
FROM base AS gateway
EXPOSE 8000
HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/')" || exit 1
CMD ["uv", "run", "python", "-m", "src.gateway.main"]