From aff4753742c81951ca1045ff565157d96a2921b5 Mon Sep 17 00:00:00 2001 From: "const.koutsakis@aurecongroup.com" Date: Sun, 26 Apr 2026 20:17:37 +1000 Subject: [PATCH] chore: docker-compose.yml (app + frontend + jaeger) (#7) 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) --- docker-compose.yml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..67c6ae8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,44 @@ +# Local dev topology: backend (FastAPI) + frontend (Vite dev server) + Jaeger +# (OTLP collector + UI). One command to a working stack with traces. +# +# `docker compose up` brings the three services up on their published ports. +# Backend at http://localhost:8000, frontend at http://localhost:5173, Jaeger +# UI at http://localhost:16686. The frontend image (built by ticket #21) ships +# the Vite dev server bound to 0.0.0.0:5173 so HMR works through the published +# port. + +services: + app: + build: . + ports: + - "8000:8000" + env_file: + - path: .env + required: false + depends_on: + - jaeger + environment: + # OTLP gRPC endpoint inside the compose network — the SDK auto-detects + # OTEL_EXPORTER_OTLP_ENDPOINT and emits to Jaeger's OTLP receiver. + - OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317 + - OTEL_EXPORTER_OTLP_PROTOCOL=grpc + - OTEL_SERVICE_NAME=harness-python-react + + frontend: + build: ./frontend + ports: + - "5173:5173" + depends_on: + - app + # Bind-mount the source so Vite HMR sees host edits. node_modules stays + # inside the container so platform-native deps aren't shadowed. + volumes: + - ./frontend:/app + - /app/node_modules + + jaeger: + image: jaegertracing/all-in-one:latest + ports: + - "16686:16686" # Jaeger UI + - "4317:4317" # OTLP gRPC + - "4318:4318" # OTLP HTTP