forked from guacamoledragon/throw-voice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
105 lines (102 loc) · 2.84 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
version: '3.4'
x-logging: &logging
driver: json-file
options:
max-size: 100m
max-file: '5'
services:
bot:
image: registry.gitlab.com/pawabot/pawa:${VERSION}
depends_on:
- datastore
deploy:
resources:
limits:
cpus: 1
memory: 6G
environment:
- BOT_ACTIVITY=${BOT_ACTIVITY}
- BOT_DATA_DIR=${BOT_DATA_DIR}
- BOT_FILE_FORMAT=${BOT_FILE_FORMAT}
- BOT_HTTP_PORT=${BOT_HTTP_PORT}
- BOT_GUILD_WHITELIST=${BOT_GUILD_WHITELIST}
- BOT_LEAVE_GUILD_AFTER=${BOT_LEAVE_GUILD_AFTER}
- BOT_MAINTENANCE=${BOT_MAINTENANCE}
- BOT_MP3_VBR=${BOT_MP3_VBR}
- BOT_STANDALONE=${BOT_STANDALONE}
- BOT_TOKEN=${BOT_TOKEN}
- BOT_WEBSITE=${BOT_WEBSITE}
- DB_NAME=${DB_NAME}
- DB_HOST=${DB_HOST}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DS_ACCESS_KEY=${DS_ACCESS_KEY}
- DS_BASEURL=${DS_BASEURL}
- DS_BUCKET=${DS_BUCKET}
- DS_HOST=${DS_HOST}
- DS_SECRET_KEY=${DS_SECRET_KEY}
- OVERRIDE_FILE=${OVERRIDE_FILE}
- TRACING_API_KEY=${TRACING_API_KEY}
- TZ=${TZ}
- JAVA_TOOL_OPTIONS=-Dlog4j.configurationFile=log4j2-prod.xml
-XX:MinRAMPercentage=${JVM_MIN_RAM_PERCENTAGE}
-XX:MaxRAMPercentage=${JVM_MAX_RAM_PERCENTAGE}
ports:
- "127.0.0.1:1112:1112"
restart: on-failure:100
volumes:
- data:${BOT_DATA_DIR}
- ./logs:/app/logs
logging:
<<: *logging
database:
image: postgres@sha256:b6a3459825427f08ab886545c64d4e5754aa425c5eea678d5359f06a9bf7faab
deploy:
resources:
limits:
cpus: 1
memory: 2G
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "127.0.0.1:5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
datastore:
image: minio/minio:RELEASE.2021-03-04T00-53-13Z
command: gateway s3 https://s3.us-west-001.backblazeb2.com
deploy:
resources:
limits:
cpus: 1
memory: 1G
environment:
- MINIO_ACCESS_KEY=${DS_ACCESS_KEY}
- MINIO_SECRET_KEY=${DS_SECRET_KEY}
- TZ=${TZ}
logging:
<<: *logging
nginx:
image: nginx:1.19-alpine
command: /bin/sh -c "envsubst '$${BOT_HTTP_HOST},$${BOT_HTTP_PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"
environment:
- BOT_HTTP_HOST=${BOT_HTTP_HOST:-localhost}
- BOT_HTTP_PORT=${BOT_HTTP_PORT}
volumes:
- ${CONF_DIR:-./}nginx.conf:/etc/nginx/nginx.conf.template
ports:
- 80:80
depends_on:
- bot
logging:
<<: *logging
volumes:
data:
driver: local-persist
driver_opts:
mountpoint: ${BOT_MOUNT_DIR}
db-data:
driver: local-persist
driver_opts:
mountpoint: ${DB_MOUNT_DIR}