-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
51 lines (50 loc) · 1.33 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
version: '3'
services:
mysql:
container_name: database
build:
context: ./mysql
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=root_bot_buster
volumes:
- ./mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./mysql/conf.d:/etc/mysql/conf.d
# - ./mysql/mount:/var/lib/mysql # creates persistence
ports:
- 3307:3306
networks:
- botdetector-network
healthcheck:
test: "mysqladmin ping -h localhost -u root -proot_bot_buster"
# during this period fails are not considered
start_period: 30s
# time between cmd
interval: 30s
# time given to the cmd
timeout: 5s
api:
build:
context: .
dockerfile: Dockerfile
target: base
args:
root_path: /
api_port: 5000
command: uvicorn src.core.server:app --host 0.0.0.0 --reload --reload-include src/* --log-level warning
container_name: bd-dev-api
environment:
- sql_uri=mysql+asyncmy://root:root_bot_buster@mysql/playerdata
- discord_sql_uri=mysql+asyncmy://root:root_bot_buster@mysql/discord
- token=verify_ban
volumes:
- ./src:/project/src:rw
ports:
- 5000:5000
networks:
- botdetector-network
depends_on:
mysql:
condition: service_healthy
networks:
botdetector-network: