-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.swarm.yml
128 lines (123 loc) · 3.01 KB
/
docker-compose.swarm.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
version: '3.9'
services:
db:
command:
- "postgres"
- "-c"
- "max_connections=2000"
- "-c"
- "shared_buffers=1GB"
- "-c"
- "effective_cache_size=3GB"
- "-c"
- "maintenance_work_mem=256MB"
- "-c"
- "checkpoint_completion_target=0.9"
- "-c"
- "wal_buffers=16MB"
- "-c"
- "default_statistics_target=100"
- "-c"
- "random_page_cost=1.1"
- "-c"
- "effective_io_concurrency=200"
- "-c"
- "work_mem=262kB"
- "-c"
- "min_wal_size=1GB"
- "-c"
- "max_wal_size=4GB"
- "-c"
- "max_worker_processes=4"
- "-c"
- "max_parallel_workers_per_gather=2"
- "-c"
- "max_parallel_workers=4"
- "-c"
- "max_parallel_maintenance_workers=2"
deploy:
resources:
limits:
cpus: "4"
memory: "4G"
reservations:
cpus: "1"
memory: "512M"
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
image: postgres:13.5-alpine3.14
networks:
- db-net
volumes:
- db-data:/var/lib/postgresql/data
entrypoint:
build: ./entrypoint
environment:
- ADMIN_PANEL_LISTEN_PORT=8080
- API_PORT=5555
- XMPP_LISTEN_PORT=5222
deploy:
resources:
limits:
cpus: "8"
memory: "4G"
reservations:
cpus: "1"
memory: "256M"
image: "aasm/cs-entrypoint:${VERSION}"
networks:
- entrypoint-net
- external-benchmark-net
- external-sre-cs-net
volumes:
- entrypoint-data:/usr/local/etc
xmpp-server:
build: ./xmpp-server
environment:
- ADMIN_JID=admin@cs_entrypoint
- ADMIN_PASSWORD=admin
- DB_HOST=db
- DB_NAME=tigasedb
- DB_TYPE=postgresql
- DB_USER_NAME=admin
- DB_USER_PASSWORD=admin
- DB_POOL_SIZE=20
- DB_ROOT_USER_NAME=postgres
- DB_ROOT_USER_PASSWORD=postgres
- DEFAULT_VIRTUAL_HOST=cs_entrypoint
- ENTRYPOINT_REGISTRATION_ADDRESS=entrypoint:5555
- ENTRYPOINT_REGISTRATION_BACKEND_ADMIN_PANEL_NAME=admin_panel
- ENTRYPOINT_REGISTRATION_BACKEND_ADMIN_PANEL_PORT=8080
- ENTRYPOINT_REGISTRATION_BACKEND_XMPP_NAME=xmpp
- ENTRYPOINT_REGISTRATION_BACKEND_XMPP_PORT=5222
- ENTRYPOINT_REGISTRATION_MAX_RETRIES=100
- ENTRYPOINT_REGISTRATION_USER_NAME=admin
- ENTRYPOINT_REGISTRATION_USER_PASSWORD=admin
- WAIT_FOR_DB_ADDRESS=db:5432
- WAIT_FOR_ENTRYPOINT_ADDRESS=entrypoint:5555
deploy:
resources:
limits:
cpus: "8"
memory: "8G"
reservations:
cpus: "1"
memory: "1G"
image: "aasm/cs-xmpp-server:${VERSION}"
networks:
- db-net
- entrypoint-net
networks:
db-net:
entrypoint-net:
external-benchmark-net:
external: true
name: cs-benchmark
external-sre-cs-net:
external: true
name: sre-cs
volumes:
db-data:
entrypoint-data: