-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
133 lines (131 loc) · 3.34 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
133
services:
php:
build: ./docker/php83
image: example_tasks_php
cap_drop: [all]
volumes:
- ./tasks_be/src:/var/www/tasks/src:ro
networks: [backend]
stop_grace_period: 30s
stop_signal: SIGQUIT
depends_on:
mysql:
condition: service_healthy
clickhouse:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: "php /var/www/tasks/src/cli/fpm_status.php"
interval: 5s
timeout: 1s
start_period: 30s
start_interval: 1s
nginx:
build: ./docker/nginx
image: example_tasks_nginx
cap_drop: [all]
ports: ["127.0.0.1:8080:8080", "127.0.0.1:443:443"]
volumes:
- coverage-data:/var/www/coverage:ro
- ./tasks_be/docs:/var/www/docs/tasks:ro
- ./tasks_fe/src/:/var/www/tasks:ro
- ./docker/nginx/nginx.conf:/etc/nginx/http.d/default.conf:ro
networks: [backend,internet]
restart: unless-stopped
healthcheck:
test: "wget -q -O- http://127.0.0.1:8080/status"
interval: 5s
timeout: 1s
start_period: 30s
start_interval: 1s
mysql:
build: ./docker/mysql80
image: example_tasks_mysql
cap_drop: [all]
cap_add: [sys_nice]
volumes:
- mysql-data:/var/lib/mysql
- ./docker/mysql80/mysql.conf:/etc/mysql/conf.d/mysql.cnf:ro
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: tasks
MARIADB_ROOT_PASSWORD: root
MARIADB_DATABASE: tasks
networks: [backend]
restart: unless-stopped
healthcheck:
test: "mysql -uroot -proot -e 'show tables from tasks'"
interval: 5s
timeout: 1s
start_period: 30s
start_interval: 1s
clickhouse:
build: ./docker/clickhouse
image: example_tasks_clickhouse
cap_drop: [all]
volumes:
- clickhouse-data:/var/lib/clickhouse
- ./docker/clickhouse/config.xml:/etc/clickhouse-server/config.d/docker_related_config.xml:ro
- ./docker/clickhouse/setup.sql:/docker-entrypoint-initdb.d/setup.sql:ro
environment:
CLICKHOUSE_DB: tasks
CLICKHOUSE_USER: root
CLICKHOUSE_PASSWORD: root
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
ulimits:
nofile:
soft: "262144"
hard: "262144"
networks: [backend]
depends_on:
mysql:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: "wget -q -O- http://127.0.0.1:8123/ping"
interval: 5s
timeout: 1s
start_period: 30s
start_interval: 1s
redis:
build: ./docker/redis
image: example_tasks_redis
cap_drop: [all]
volumes:
- redis-data:/var/lib/redis
environment:
REDISCLI_AUTH: default
networks: [backend]
restart: unless-stopped
healthcheck:
test: "redis-cli ping"
interval: 5s
timeout: 1s
start_period: 30s
start_interval: 1s
mailpit:
build: docker/mailpit
image: example_tasks_mailpit
cap_drop: [all]
ports: ["127.0.0.1:8025:8025"]
networks: [backend,internet]
restart: unless-stopped
healthcheck:
test: "netstat -ln | grep 1025"
interval: 5s
timeout: 1s
start_period: 30s
start_interval: 1s
networks:
backend:
driver: bridge
internal: true
internet:
driver: bridge
volumes:
mysql-data:
clickhouse-data:
redis-data:
coverage-data: