-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
178 lines (167 loc) · 4.14 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
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
167
168
169
170
171
172
173
174
175
176
177
178
version: '3.9'
services:
gateway:
container_name: 'lisa-gateway'
build: ./bot
image: registry.zero-team.pro/lisa/bot:${TAG-latest}
restart: always
env_file: .env
command: 'yarn run start-gateway'
networks:
- default
- nginx-proxy
volumes:
- './.env:/app/.env:ro'
- '${DATA_MOUNT_PATH}/certs/:/certs:ro'
environment:
- SHARD_COUNT=2
- DB_FORCE=${DB_FORCE}
- VIRTUAL_HOST=${API_HOST}
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=${API_HOST_LE}
depends_on:
- 'db'
- 'redis'
bot-shard-0:
container_name: 'lisa-bot-shard-0'
image: registry.zero-team.pro/lisa/bot:${TAG-latest}
restart: always
env_file: .env
command: 'yarn run start-cluster'
volumes:
- './.env:/app/.env:ro'
- '${DATA_MOUNT_PATH}/certs/:/certs:ro'
environment:
- SHARD_ID=0
- SHARD_COUNT=2
depends_on:
- 'db'
- 'redis'
bot-shard-1:
container_name: 'lisa-bot-shard-1'
image: registry.zero-team.pro/lisa/bot:${TAG-latest}
restart: always
env_file: .env
command: 'yarn run start-cluster'
volumes:
- './.env:/app/.env:ro'
- '${DATA_MOUNT_PATH}/certs/:/certs:ro'
environment:
- SHARD_ID=1
- SHARD_COUNT=2
depends_on:
- 'db'
- 'redis'
telegram:
container_name: 'lisa-telegram'
image: registry.zero-team.pro/lisa/bot:${TAG-latest}
restart: always
env_file: .env
command: 'yarn run start-telegram'
profiles: ['telegram']
networks:
- default
- nginx-proxy
volumes:
- './.env:/app/.env:ro'
- '${DATA_MOUNT_PATH}/certs/:/certs:ro'
environment:
- SHARD_ID=0
- VIRTUAL_HOST=${TELEGRAM_WH_HOST}
- VIRTUAL_PORT=${TELEGRAM_WH_PORT}
- LETSENCRYPT_HOST=${TELEGRAM_WH_HOST}
depends_on:
- 'db'
- 'redis'
vm-1:
container_name: 'lisa-vm-1'
image: registry.zero-team.pro/lisa/bot:${TAG-latest}
restart: always
env_file: .env
command: 'yarn run start-vm'
profiles: ['vm']
volumes:
- './.env:/app/.env:ro'
- '${DATA_MOUNT_PATH}/certs/:/certs:ro'
- '${DATA_MOUNT_PATH}/vm/:/data'
- '/var/run/docker.sock:/var/run/docker.sock'
environment:
- API_HOST=gateway
depends_on:
- 'db'
- 'redis'
- 'gateway'
# DEPRECATED
# rater:
# container_name: 'lisa-rater'
# build: ./rater
# image: registry.zero-team.pro/lisa/rater:${TAG-latest}
# restart: always
# env_file: .env
# profiles: ['rater']
# volumes:
# - './.env:/app/.env:ro'
db:
container_name: 'lisa-postgresql'
build: ./db
image: registry.zero-team.pro/lisa/db:${TAG-latest}
restart: always
env_file: .env
user: ${POSTGRES_UGID}
ports:
- '9302:5432'
volumes:
- '${DATA_MOUNT_PATH}/postgres/:/var/lib/postgresql/data/'
redis:
container_name: 'lisa-redis'
image: zeroteampro/redis:v7.0.12
restart: always
env_file: .env
ports:
- '9343:6379'
volumes:
- '${DATA_MOUNT_PATH}/certs/redis/:/certs'
- '${DATA_MOUNT_PATH}/redis/:/data'
environment:
- REDIS_MAX_MEMORY=256mb
- REDIS_TLS_GEN=true
- REDIS_TLS_ON=true
postgres-exporter:
container_name: 'lisa-postgres-exporter'
build: ./devops/postgres-exporter
image: registry.zero-team.pro/lisa/postgres-exporter:${TAG-latest}
restart: always
env_file: .env
profiles: ['monitor']
ports:
- '19187:9187'
depends_on:
- db
admin:
container_name: 'lisa-admin'
build:
context: ./admin
args:
REACT_APP_API_HOST: ${API_HOST}
REACT_APP_API_HOST_LE: ${API_HOST_LE}
image: registry.zero-team.pro/lisa/admin:${TAG-latest}
restart: always
env_file: .env
profiles: ['admin']
networks:
- default
- nginx-proxy
volumes:
- './admin/test/screenshots:/app/test/screenshots'
environment:
- VIRTUAL_HOST=${ADMIN_HOST}
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=${ADMIN_HOST_LE}
depends_on:
- 'gateway'
networks:
default:
name: lisa
nginx-proxy:
name: nginx-proxy
external: true