-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 2.48 KB
/
docker-compose.yml
File metadata and controls
99 lines (94 loc) · 2.48 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
services:
# Go backend with hot reloading (development mode)
lawrence:
build:
context: .
dockerfile: Dockerfile.dev
container_name: lawrence-oss
ports:
- "8080:8080" # HTTP API
- "4320:4320" # OpAMP server
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
- "2345:2345" # Delve debugger (optional)
volumes:
# Mount source code for hot reloading
- ./cmd:/app/cmd
- ./internal:/app/internal
- ./go.mod:/app/go.mod
- ./go.sum:/app/go.sum
- ./lawrence.yaml:/app/lawrence.yaml
# Persist data directory
- lawrence-data:/app/data
# Persist go build cache for faster rebuilds
- go-build-cache:/root/.cache/go-build
- go-mod-cache:/go/pkg/mod
environment:
- GIN_MODE=debug
- CGO_ENABLED=1
- LOG_LEVEL=debug
- LOG_FORMAT=console
- TZ=UTC
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- lawrence-network
# Development UI server with hot-reloading
ui:
build:
context: ./ui
dockerfile: Dockerfile
container_name: lawrence-ui
ports:
- "5173:5173" # Vite dev server
volumes:
- ./ui:/app
- /app/node_modules # Prevent overwriting node_modules
environment:
- VITE_BACKEND_URL=http://localhost:8080
depends_on:
- lawrence
networks:
- lawrence-network
restart: unless-stopped
# Demo OpenTelemetry Collector with OpAMP support
collector:
image: otel/opentelemetry-collector-contrib:0.134.1
container_name: demo-collector
command: ['--config', '/etc/otelcol-contrib/config.yaml']
ports:
- "4319:4317" # OTLP gRPC receiver
- "4321:4318" # OTLP HTTP receiver
- "13133:13133" # Health check
volumes:
- ./examples/collector/demo-collector.yaml:/etc/otelcol-contrib/config.yaml:ro
depends_on:
- lawrence
networks:
- lawrence-network
restart: unless-stopped
supervisor:
build:
context: ./examples/supervisor
dockerfile: Dockerfile
container_name: demo-supervisor
depends_on:
- lawrence
networks:
- lawrence-network
restart: unless-stopped
volumes:
lawrence-data:
driver: local
go-build-cache:
driver: local
go-mod-cache:
driver: local
networks:
lawrence-network:
driver: bridge