-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
88 lines (86 loc) · 2.07 KB
/
docker-compose.yaml
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
version: '3'
volumes:
postgres_volume:
prometheus_volume:
grafana_volume:
services:
auth:
image: auth:${APP_IMAGE_TAG}
container_name: auth
env_file:
- ${ENV}.env
ports:
- "${GRPC_PORT}:${GRPC_PORT}"
- "${HTTP_PORT}:${HTTP_PORT}"
- "${SWAGGER_PORT}:${SWAGGER_PORT}"
- "${PROMETHEUS_HTTP_PORT}:${PROMETHEUS_HTTP_PORT}"
networks:
- service-network
depends_on:
db-auth:
condition: service_healthy
migrator-auth:
condition: service_completed_successfully
db-auth:
image: postgres:${POSTGRES_IMAGE_TAG}
container_name: db-auth
env_file:
- ${ENV}.env
ports:
- "${POSTGRES_PORT_LOCAL}:5432"
networks:
- service-network
volumes:
- postgres_volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 5s
retries: 5
migrator-auth:
image: migrator-auth:${MIGRATOR_IMAGE_TAG}
container_name: migrator-auth
restart: on-failure
environment:
DB_HOST: db-auth
networks:
- service-network
depends_on:
db-auth:
condition: service_healthy
prometheus:
image: prom/prometheus:${PROMETHEUS_IMAGE_TAG}
container_name: prometheus
env_file:
- ${ENV}.env
ports:
- "9090:9090"
networks:
- service-network
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./metrics/prometheus.yml:/etc/prometheus/prometheus.yml
- ./metrics/alerts.yml:/etc/prometheus/alerts.yml
- prometheus_volume:/prometheus
grafana:
image: grafana/grafana-oss:${GRAFANA_IMAGE_TAG}
container_name: grafana
ports:
- "3000:3000"
networks:
- service-network
volumes:
- grafana_volume:/var/lib/grafana
jaeger:
image: jaegertracing/all-in-one:${JAEGER_IMAGE_TAG}
container_name: jaeger
ports:
- "16686:16686" # web
- "4317:4317" # OTLP over gRPC
networks:
- service-network
networks:
service-network:
name: service-net
external: true