-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (50 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
56 lines (50 loc) · 1.26 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
# Quick start Docker Compose setup for ConnX
# Run with: docker-compose up -d
version: '3.8'
services:
# ConnX proxy server
connx:
build: .
ports:
- "8080:8080"
volumes:
- ./configs/examples/basic.yaml:/app/configs/config.yaml:ro
depends_on:
- backend1
- backend2
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/metrics"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Example backend services (using nginx)
backend1:
image: nginx:alpine
ports:
- "8081:80"
volumes:
- ./examples/html:/usr/share/nginx/html:ro
restart: unless-stopped
backend2:
image: nginx:alpine
ports:
- "8082:80"
volumes:
- ./examples/html:/usr/share/nginx/html:ro
restart: unless-stopped
# Optional: Prometheus for metrics collection
prometheus:
image: prom/prometheus:latest
ports:
- "9090:9090"
volumes:
- ./configs/examples/prometheus.yml:/etc/prometheus/prometheus.yml:ro
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
restart: unless-stopped
networks:
default:
driver: bridge