-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdocker-compose.yml
141 lines (131 loc) · 3.07 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
# SPDX-FileCopyrightText: 2023 Joonas Rautiola <[email protected]>
# SPDX-License-Identifier: MPL-2.0
# https://git.joinemm.dev/miso-bot
services:
nirn:
container_name: miso-gateway
image: "ghcr.io/germanoeich/nirn-proxy:main"
restart: unless-stopped
expose:
- 8080
environment:
- REQUEST_TIMEOUT=10000 # 10 seconds
profiles: [prod, dev-extra]
bot-db:
container_name: miso-bot-db
image: mariadb
restart: unless-stopped
volumes:
- miso-data:/var/lib/mysql
- ./sql/init:/docker-entrypoint-initdb.d:ro
- ./sql/scheduled:/scripts:ro
ports:
- 3306:3306 # for development
environment:
- MARIADB_USER=bot
- MARIADB_PASSWORD=botpw
- MARIADB_DATABASE=misobot
- MARIADB_ROOT_PASSWORD=secure-af
profiles: [prod, dev, dev-extra]
shlink-db:
container_name: miso-shlink-db
image: mariadb
restart: unless-stopped
volumes:
- shlink-data:/var/lib/mysql
environment:
- MARIADB_USER=shlink
- MARIADB_PASSWORD=shlinkpw
- MARIADB_DATABASE=shlink
- MARIADB_ROOT_PASSWORD=secure-af
profiles: [prod]
image-server:
container_name: miso-image-server
build: https://github.com/joinemm/html-imager.git#master
restart: unless-stopped
init: true
expose:
- 3000
volumes:
- ./html/static:/app/static:ro
- ./html/templates:/app/templates:ro
profiles: [prod, dev-extra]
shlink:
container_name: miso-shlink
image: shlinkio/shlink:latest
restart: unless-stopped
ports:
- 8080:8080
expose:
- 8080
environment:
- DEFAULT_DOMAIN=url.misobot.xyz
- IS_HTTPS_ENABLED=true
- DB_DRIVER=maria
- DB_NAME=shlink
- DB_USER=shlink
- DB_PASSWORD=shlinkpw
- DB_HOST=shlink-db
- SHELL_VERBOSITY=3
depends_on:
- shlink-db
profiles: [prod]
bot-prod:
container_name: miso-bot
build: .
command: python -O main.py
restart: unless-stopped
ports:
- 3000:8080
expose:
- 8080
depends_on:
- bot-db
env_file:
- .env
environment:
- DB_HOST=miso-bot-db
- IMAGE_SERVER_HOST=image-server
- EMOJIFIER_HOST=emojifier
- WEBSERVER_PORT=8080
- WEBSERVER_HOSTNAME=0.0.0.0
- USE_REDIS_CACHE=1
- DISCORD_PROXY=http://nirn:8080
tty: true
profiles: [prod]
bot-dev:
container_name: miso-bot-dev
build: .
command: python -O main.py dev
restart: unless-stopped
expose:
- 8080
depends_on:
- bot-db
env_file:
- .env
environment:
- DB_HOST=miso-bot-db
- IMAGE_SERVER_HOST=image-server
- WEBSERVER_PORT=8080
- WEBSERVER_HOSTNAME=0.0.0.0
- USE_REDIS_CACHE=1
tty: true
profiles: [dev, dev-extra]
redis:
container_name: miso-redis
image: "redis:alpine"
environment:
- REDIS_REPLICATION_MODE=master
expose:
- 6379
volumes:
- redis-data:/data
profiles: [prod, dev-extra]
networks:
default:
driver: bridge
volumes:
miso-data:
shlink-data:
redis-data: