-
Notifications
You must be signed in to change notification settings - Fork 89
/
docker-compose.yml
106 lines (98 loc) · 2.61 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
version: '3'
services:
traefik:
image: traefik:2.9
restart: unless-stopped
volumes:
- ./traefik_dynamic.yml:/traefik_dynamic.yml:ro
environment:
TRAEFIK_PROVIDERS_FILE_FILENAME: "/traefik_dynamic.yml"
TRAEFIK_PING: "true"
TRAEFIK_ENTRYPOINTS_HTTP_ADDRESS: ":80"
healthcheck:
test: [ "CMD", "traefik", "healthcheck" ]
interval: 3s
timeout: 3s
retries: 3
ports:
- "8080:80"
polemarch:
image: ${WERF_MAIN_DOCKER_IMAGE_NAME:-polemarch}
build:
context: .
args:
PACKAGE_NAME: ${PACKAGE_NAME:-polemarch}
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
database:
condition: service_healthy
centrifugo:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/api/health/" ]
interval: 3s
timeout: 3s
retries: 3
tty: true
volumes:
- ./settings.ini:/etc/polemarch/settings.ini:ro
- projects-volume:/projects
redis:
image: "redis:6"
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 3s
retries: 3
database:
image: mysql:8.0
restart: unless-stopped
tty: true
environment:
MYSQL_USER: project_user
MYSQL_PASSWORD: project_pas
MYSQL_DATABASE: project_db
MYSQL_ROOT_PASSWORD: project_root
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost", "-u", "root", "-p${POLEMARCH_SQL_ROOT_PASSWORD:-project_root}" ]
interval: 3s
timeout: 3s
retries: 3
volumes:
- data-volume:/var/lib/mysql
centrifugo:
image: centrifugo/centrifugo:v3
restart: unless-stopped
tty: true
environment:
CENTRIFUGO_TOKEN_HMAC_SECRET_KEY: "d4074fd2-607c-41b0-ab83-f2bc55fae0ec"
CENTRIFUGO_API_KEY: "a08caef0-f1ad-40de-9e59-dd2cec07e2eb"
CENTRIFUGO_ADMIN: "true"
CENTRIFUGO_ADMIN_PASSWORD: "01a18ca9-9328-4ee7-a8de-7e5b231d1df4"
CENTRIFUGO_ADMIN_SECRET: "7e91c9c1-6303-42b1-9f28-1cdfbf58dcf9"
CENTRIFUGO_HISTORY_SIZE: "10"
CENTRIFUGO_HISTORY_TTL: "300s"
CENTRIFUGO_HEALTH: "true"
CENTRIFUGO_ALLOWED_ORIGINS: "*"
healthcheck:
test: [ "CMD", "sh", "-c", "wget -nv -O - http://localhost:8000/health" ]
interval: 3s
timeout: 3s
retries: 3
command: centrifugo
ulimits:
nofile:
soft: 65535
hard: 65535
volumes:
data-volume:
projects-volume:
networks:
default:
ipam:
driver: default
config:
- subnet: "172.100.100.0/24"