-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (50 loc) · 1.2 KB
/
docker-compose.yml
File metadata and controls
55 lines (50 loc) · 1.2 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
version: '3.8'
services:
taskqueue:
build: .
ports:
- "8080:8080"
- "9090:9090"
environment:
- DATABASE_URL=postgres://taskqueue:taskqueue@postgres:5432/taskqueue?sslmode=disable
- HTTP_ADDR=:8080
- METRICS_ADDR=:9090
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=taskqueue
- POSTGRES_PASSWORD=taskqueue
- POSTGRES_DB=taskqueue
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./migrations:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U taskqueue"]
interval: 5s
timeout: 5s
retries: 5
prometheus:
image: prom/prometheus:v2.48.0
ports:
- "9091:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
grafana:
image: grafana/grafana:10.2.2
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana_data:/var/lib/grafana
volumes:
postgres_data:
grafana_data: