-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.35 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.35 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
services:
gateway:
build:
context: .
dockerfile: Dockerfile
environment:
GATEWAY_ADDR: ":8080"
UPSTREAM_URL: "${UPSTREAM_URL:-http://localhost:9000}"
REDIS_ADDR: "${REDIS_URL:-redis:6379}"
RATE_LIMITER: "${RATE_LIMITER:-token-bucket-redis}"
RATE_LIMIT: "${RATE_LIMIT:-5}"
RATE_LIMIT_WINDOW: "${RATE_LIMIT_WINDOW:-1m}"
BUCKET_CAPACITY: "${BUCKET_CAPACITY:-5}"
API_KEY_HASHES: "${API_KEY_HASHES}"
expose:
- "8080"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8080/readyz"]
interval: 10s
timeout: 2s
retries: 3
start_period: 5s
nginx:
image: nginx:1.27-alpine
ports:
- "8080:80"
volumes:
- ./deploy/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- gateway
prometheus:
image: prom/prometheus:v2.55.1
ports:
- "9090:9090"
volumes:
- ./deploy/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
depends_on:
- gateway
grafana:
image: grafana/grafana:11.3.0
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: "admin"
GF_SECURITY_ADMIN_PASSWORD: "admin"
volumes:
- ./deploy/grafana/provisioning:/etc/grafana/provisioning:ro
- ./deploy/grafana/dashboards:/var/lib/grafana/dashboards:ro
depends_on:
- prometheus