-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
59 lines (57 loc) · 1.27 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
version: "3"
services:
db:
image: mariadb
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: "twitch"
MYSQL_DATABASE: "twitch"
command: ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
redis:
image: redis
ports:
- "6379"
twitch_chat_service:
build: .
ports:
- "8000:8000"
env_file:
- ./twitch_chat_service/.env
environment:
DB_HOST: "host.docker.internal"
DB_PORT: 3306
DB_USER: "root"
DB_PASS: "twitch"
DB_DB: "twitch"
REDIS_HOST: "redis"
REDIS_PORT: 6379
REDIS_DB: 0
ENV: "development"
volumes:
# for code reloading
- "./:/code"
command: ["uvicorn", "--reload", "--host", "0.0.0.0", "twitch_chat_service.__main__:app"]
depends_on:
- db
- redis
twitch_chat_consumer:
build:
context: .
dockerfile: ./twitch_chat_consumer/Dockerfile
environment:
DB_HOST: "host.docker.internal"
DB_PORT: 3306
DB_USER: "root"
DB_PASS: "twitch"
DB_DB: "twitch"
REDIS_HOST: "redis"
REDIS_PORT: 6379
REDIS_DB: 0
ENV: "development"
volumes:
# for code reloading
- ".:/code"
depends_on:
- db
- redis