-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.base.yaml
166 lines (164 loc) · 3.97 KB
/
docker-compose.base.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
156
157
158
159
160
161
162
163
164
165
166
services:
backend:
restart: on-failure
command: sh ./docker/scripts/backend.sh
container_name: food-anywhere-backend
ports:
- "8000:8000"
volumes:
- .:/src
networks:
- main
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
celery:
restart: on-failure
container_name: food-anywhere-celery
command: sh ./docker/scripts/celery.sh
volumes:
- .:/src
- ./logs/celery:/var/log/celery
networks:
- main
depends_on:
backend:
condition: service_started
celery-beat:
restart: on-failure
container_name: food-anywhere-celery-beat
command: sh ./docker/scripts/celery-beat.sh
volumes:
- .:/src
- ./logs/celery-beat/:/var/log/celery-beat/
networks:
- main
depends_on:
backend:
condition: service_started
postgres:
restart: on-failure
container_name: food-anywhere-postgres
image: postgis/postgis:16-3.4
expose:
- "5432"
volumes:
- food_anywhere_postgres_data:/var/lib/postgresql/data/
- ./docker/scripts/postgres.sh:/docker-entrypoint-initdb.d/entrypoint.sh
networks:
- main
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 2s
timeout: 5s
retries: 5
redis:
restart: on-failure
container_name: food-anywhere-redis
image: redis:6.2-alpine
expose:
- "6379"
networks:
- main
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 2s
timeout: 5s
retries: 5
smtp4dev:
image: rnwood/smtp4dev:v3
restart: always
container_name: food-anywhere-smtp4dev
ports:
- "5000:80"
expose:
- "25"
networks:
- main
promtail:
image: grafana/promtail:2.5.0
container_name: food-anywhere-promtail
volumes:
- ./promtail/config.yaml:/etc/promtail/promtail.yaml
- ./logs/:/var/log/
command: --config.file=/etc/promtail/promtail.yaml
depends_on:
- backend
networks:
- main
loki:
image: grafana/loki:2.5.0
container_name: food-anywhere-loki
ports:
- "3100:3100"
depends_on:
- promtail
networks:
- main
node_exporter:
image: quay.io/prometheus/node-exporter:v1.2.2
container_name: food-anywhere-node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- food_anywhere_node_exporter_data:/host
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
expose:
- 9100
networks:
- main
depends_on:
- backend
prometheus:
image: prom/prometheus:v2.35.0
container_name: food-anywhere-prometheus
volumes:
- ./prometheus/config.yaml:/etc/prometheus/prometheus.yml
- food_anywhere_prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
ports:
- 9090:9090
depends_on:
- backend
networks:
- main
jaeger:
image: jaegertracing/all-in-one:1.32
container_name: food-anywhere-jaeger
ports:
- 16686:16686
networks:
- main
volumes:
- food_anywhere_jaeger_data:/var/lib/jaeger
depends_on:
- backend
grafana:
image: grafana/grafana:8.2.3
container_name: food-anywhere-grafana
ports:
- 3000:3000
networks:
- main
volumes:
- food_anywhere_grafana_data:/var/lib/grafana
- ./grafana/datasources.yaml:/etc/grafana/provisioning/datasources/dashboard.yaml
depends_on:
- loki
- prometheus
- jaeger
networks:
main: