-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
99 lines (94 loc) · 2.63 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
services:
mysql:
container_name: database
build:
context: ./mysql
image: bot-detector/mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=root_bot_buster
volumes:
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
# - ./mysql/mount:/var/lib/mysql # creates persistence
ports:
- 3307:3306
networks:
- botdetector-network
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
mysql_setup:
container_name: mysql_setup
image: bot-detector/mysql_setup
build:
context: ./mysql_setup
command: ["python", "-u","setup_mysql.py"]
networks:
- botdetector-network
depends_on:
mysql:
condition: service_healthy
core_api:
image: quay.io/bot_detector/bd-core-files:4f82016
command: uvicorn src.core.server:app --host 0.0.0.0 --reload --reload-include src/*
environment:
- sql_uri=mysql+asyncmy://root:root_bot_buster@mysql:3306/playerdata
- discord_sql_uri=mysql+asyncmy://root:root_bot_buster@mysql:3306/discord
- token=verify_ban
- env=DEV
# Ports exposed to the other services but not to the host machine
expose:
- 5000
ports:
- 5001:5000
networks:
- botdetector-network
depends_on:
mysql_setup:
condition: service_completed_successfully
private_api:
image: quay.io/bot_detector/private-api:e96c31a
command: uvicorn src.core.server:app --host 0.0.0.0 --reload --reload-include src/*
# Ports exposed to the other services but not to the host machine
expose:
- 5000
ports:
- 5002:5000
networks:
- botdetector-network
# this overrides the env_file for the specific variable
environment:
- KAFKA_HOST=kafka:9092
- DATABASE_URL=mysql+aiomysql://root:root_bot_buster@mysql:3306/playerdata
- ENV=DEV
- POOL_RECYCLE=60
- POOL_TIMEOUT=30
depends_on:
mysql_setup:
condition: service_completed_successfully
machine_learning:
container_name: bd-ml
build:
context: .
dockerfile: Dockerfile
target: base
args:
root_path: /
api_port: 8000
command: uvicorn api.app:app --host 0.0.0.0 --reload --reload-include api/*
environment:
- token=verify_ban
- secret_token=super_secret_token
- private_api=http://private_api:5000
- detector_api=http://core_api:5000
volumes:
- ./api:/project/api
ports:
- 5003:8000
networks:
- botdetector-network
depends_on:
- private_api
- core_api
networks:
botdetector-network: