generated from draincoder/pyproject
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
155 lines (146 loc) · 3.84 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
services:
order:
profiles: [ "exchange" ]
container_name: example.order
hostname: example.order
build:
context: .
restart: unless-stopped
depends_on:
rabbit:
condition: service_healthy
networks:
- example.grafana.network
- example.rabbit.network
volumes:
- ./config:/app/config:ro
environment:
- CONFIG_PATH=$CONFIG_PATH
command: [ "python", "-m", "exchange.order_service.main" ]
trade:
profiles: [ "exchange" ]
container_name: example.trade
hostname: example.trade
build:
context: .
restart: unless-stopped
depends_on:
rabbit:
condition: service_healthy
networks:
- example.grafana.network
- example.rabbit.network
volumes:
- ./config:/app/config:ro
environment:
- CONFIG_PATH=$CONFIG_PATH
command: [ "python", "-m", "exchange.trade_service.main" ]
notification:
profiles: [ "exchange" ]
container_name: example.notification
hostname: example.notification
build:
context: .
restart: unless-stopped
depends_on:
rabbit:
condition: service_healthy
networks:
- example.grafana.network
- example.rabbit.network
volumes:
- ./config:/app/config:ro
environment:
- CONFIG_PATH=$CONFIG_PATH
command: [ "python", "-m", "exchange.notification_service.main" ]
rabbit:
profiles: [ "exchange" ]
image: rabbitmq:3.11-management-alpine
container_name: example.rabbit
hostname: example.rabbit
restart: unless-stopped
expose:
- "5672"
- "15672"
ports:
- "127.0.0.1:5671:5671"
- "127.0.0.1:5672:5672"
- "127.0.0.1:15672:15672"
networks:
- example.rabbit.network
volumes:
- example.rabbit.data:/var/lib/rabbitmq/:rw
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_USER:-admin}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD:-admin}
healthcheck:
test: [ "CMD-SHELL", "rabbitmq-diagnostics check_running -q" ]
interval: 10s
timeout: 60s
retries: 5
start_period: 10s
grafana:
profiles: [ "grafana" ]
image: grafana/grafana:latest
container_name: example.grafana
hostname: example.grafana
restart: unless-stopped
expose:
- "3000"
ports:
- "127.0.0.1:3000:3000"
networks:
- example.grafana.network
volumes:
- example.grafana.data:/var/lib/grafana:rw
- ./grafana/provisioning:/etc/grafana/provisioning:rw
- ./grafana/dashboards:/etc/grafana/dashboards
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
- GF_DATABASE_WAL=true
- VIRTUAL_HOST=example.grafana
- NETWORK_ACCESS=internal
- VIRTUAL_PORT=3000
tempo:
profiles: [ "grafana" ]
image: grafana/tempo:latest
container_name: example.tempo
hostname: example.tempo
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- example.tempo.data:/var/tempo
- ./tempo/tempo.yaml:/etc/tempo.yaml
restart: unless-stopped
ports:
- "14250:14250"
- "4317:4317"
- "3200:3200"
expose:
- "14250"
- "4317"
- "3200"
networks:
- example.grafana.network
prometheus:
image: prom/prometheus:latest
container_name: example.prometheus
hostname: example.prometheus
command:
- --config.file=/etc/prometheus.yaml
- --web.enable-remote-write-receiver
- --enable-feature=exemplar-storage
volumes:
- ./prometheus/prometheus.yaml:/etc/prometheus.yaml
ports:
- "9090:9090"
networks:
- example.grafana.network
volumes:
example.grafana.data: {}
example.rabbit.data: {}
example.tempo.data: {}
networks:
example.grafana.network: {}
example.rabbit.network: {}