-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
138 lines (129 loc) · 3.24 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
version: "3.9"
# Replace with your values
x-db-variables: &db-variables
MYSQL_DATABASE: massa
MYSQL_USER: massa
MYSQL_PASSWORD: 2fiYyvl8ndAggYVgrfu7QtLzEd1OSMAke # replace with new password
x-redis-variables: &redis-variables
REDIS_PASSWORD: YphZdBoJzvIRsiHwlQqak0I0fZ0EL9GJDe9L6k79 # replace with new password
x-geoip-variables: &geoip-variables
MYSQL_DATABASE: geoip
MYSQL_USER: geoip
MYSQL_PASSWORD: 2fiYyvl8ndAggYVgrfu7QtLzEd1OSMAke # replace with new password
PORT: 3050
IPINFO_KEY: REPLACE_ME
CRON: 1
x-bot-variables: &bot-variables
NODE_ENV: production
MASSA_RPC: 149.202.89.125:33035,198.27.74.5:33035
BOT_ADMINS_ID: 1,2
BOTS: 1:PPrreevvee,32:DDMMeeDDVveEdd
PORT: 8443
WEBHOOK_URL: https://127.0.0.1:8443 # replace with your ip
services:
db:
container_name: hek-db
restart: always
image: docker.io/library/mysql:8.1
command: --default-authentication-plugin=mysql_native_password
volumes:
- ./.data/hek-db/lib:/var/lib/mysql
- ./.data/hek-db/log:/var/log/mysql
# - ./.data/my.cnf:/etc/mysql/conf.d/hek.cnf
cap_add:
# mbind: Operation not permitted
- SYS_NICE
ports:
# debug only
# - "127.0.0.1:23306:3306"
environment:
<<: *db-variables
# You need to specify one of the following as an environment variable
# Only for 1st launch. Remove after
# MYSQL_ROOT_PASSWORD: password
# MYSQL_RANDOM_ROOT_PASSWORD: true
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 128M
redis:
container_name: hek-redis
restart: always
image: docker.io/bitnami/redis:7.2
command: /opt/bitnami/scripts/redis/run.sh --maxmemory 30mb
environment:
<<: *redis-variables
deploy:
resources:
limits:
memory: 64M
reservations:
memory: 32M
geoip:
container_name: hek-geoip
restart: always
image: ghcr.io/qqmee/massa-geo:latest
depends_on:
- db
- redis
environment:
<<: *geoip-variables
logging:
options:
max-size: "10m"
max-file: "1"
deploy:
resources:
limits:
memory: 128M
reservations:
memory: 32M
cron:
container_name: hek-cron
restart: always
image: ghcr.io/qqmee/massa-bot:latest
command: dist/apps/cron/main.js
depends_on:
- db
- redis
- geoip
environment:
<<: [*db-variables, *bot-variables, *redis-variables]
logging:
options:
max-size: "10m"
max-file: "1"
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M
bot:
container_name: hek-bot
restart: always
image: ghcr.io/qqmee/massa-bot:latest
command: dist/apps/bot/main.js
depends_on:
- db
- redis
- geoip
environment:
<<: [*db-variables, *bot-variables, *redis-variables]
ports:
- "0.0.0.0:8443:8443"
volumes:
- ./.data/private.key:/app/private.key:ro
- ./.data/public.pem:/app/public.pem:ro
logging:
options:
max-size: "10m"
max-file: "1"
deploy:
resources:
limits:
memory: 256M
reservations:
memory: 128M