Skip to content

Commit 77f0bf0

Browse files
constkclaude
andauthored
chore: docker-compose.yml (app + frontend + jaeger) (#7) (#35)
Port docker-compose.yml from Teller. Switch the frontend service from a static nginx build (Teller) to a Vite dev server on port 5173 with bind-mounted source for HMR. Bump OTel env vars from OTEL_ENDPOINT to the standard OTEL_EXPORTER_OTLP_ENDPOINT/OTEL_EXPORTER_OTLP_PROTOCOL/OTEL_SERVICE_NAME triple (matches what the OTel SDK reads in #19). Make .env optional via env_file.path +required:false so first-time `docker compose up` works without a .env file. Closes #7 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5b10276 commit 77f0bf0

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

docker-compose.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Local dev topology: backend (FastAPI) + frontend (Vite dev server) + Jaeger
2+
# (OTLP collector + UI). One command to a working stack with traces.
3+
#
4+
# `docker compose up` brings the three services up on their published ports.
5+
# Backend at http://localhost:8000, frontend at http://localhost:5173, Jaeger
6+
# UI at http://localhost:16686. The frontend image (built by ticket #21) ships
7+
# the Vite dev server bound to 0.0.0.0:5173 so HMR works through the published
8+
# port.
9+
10+
services:
11+
app:
12+
build: .
13+
ports:
14+
- "8000:8000"
15+
env_file:
16+
- path: .env
17+
required: false
18+
depends_on:
19+
- jaeger
20+
environment:
21+
# OTLP gRPC endpoint inside the compose network — the SDK auto-detects
22+
# OTEL_EXPORTER_OTLP_ENDPOINT and emits to Jaeger's OTLP receiver.
23+
- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317
24+
- OTEL_EXPORTER_OTLP_PROTOCOL=grpc
25+
- OTEL_SERVICE_NAME=harness-python-react
26+
27+
frontend:
28+
build: ./frontend
29+
ports:
30+
- "5173:5173"
31+
depends_on:
32+
- app
33+
# Bind-mount the source so Vite HMR sees host edits. node_modules stays
34+
# inside the container so platform-native deps aren't shadowed.
35+
volumes:
36+
- ./frontend:/app
37+
- /app/node_modules
38+
39+
jaeger:
40+
image: jaegertracing/all-in-one:latest
41+
ports:
42+
- "16686:16686" # Jaeger UI
43+
- "4317:4317" # OTLP gRPC
44+
- "4318:4318" # OTLP HTTP

0 commit comments

Comments
 (0)