-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
133 lines (123 loc) · 2.8 KB
/
docker-compose.yml
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
version: '3'
services:
web:
build:
context: ./requirements/Nginx/
dockerfile: ./Containerfile
ports:
- "4443:443"
- "8000:80"
volumes:
- type: bind
source: ./requirements/Nginx/conf.d/
target: /etc/nginx/conf.d/
- type: bind
source: ./requirements/Nginx/certificate/
target: /etc/nginx/ssl/
- type: bind
source: ./pong/static
target: /usr/share/nginx/html/static
- type: bind
source: ./pong/media
target: /var/www/uploads
depends_on:
app:
condition: service_healthy
env_file:
- .env
app:
build:
context: ./requirements/Django/
dockerfile: ./Containerfile
volumes:
- type: bind
source: ./pong/
target: /app/code
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 5s
timeout: 5s
retries: 5
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- .env
redis:
image: "redis:7.4-rc2"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
db:
image: "postgres:15.2"
ports:
- "5432:5432"
volumes:
- type: volume
source: db_data
target: /var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
env_file:
- .env
prometheus:
build:
context: ./requirements/Prometheus/
dockerfile: ./Containerfile
ports:
- "9090:9090"
volumes:
- type: volume
source: prometheus_data
target: /prometheus
depends_on:
app:
condition: service_healthy
restart: always
env_file:
- .env
grafana:
image: "grafana/grafana-oss"
ports:
- "3000:3000"
volumes:
- type: bind
source: ./requirements/Grafana/conf/
target: /usr/share/grafana/conf/provisioning/
- type: volume
source: grafana_data
target: /var/lib/grafana
environment:
- GF_PATHS_PROVISIONING=/usr/share/grafana/conf/provisioning
depends_on:
app:
condition: service_healthy
restart: always
env_file:
- .env
alertmanager:
build:
context: ./requirements/Alertmanager/
dockerfile: ./Containerfile
ports:
- "9093:9093"
depends_on:
app:
condition: service_healthy
restart: always
env_file:
- .env
nginx-exporter:
image: "nginx/nginx-prometheus-exporter"
ports:
- "9113:9113"
entrypoint: nginx-prometheus-exporter -nginx.scrape-uri=https://web/nginx_status
restart: always
volumes:
db_data: {}
grafana_data: {}
prometheus_data: {}