-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-standalone.yml
65 lines (62 loc) · 1.65 KB
/
docker-compose-standalone.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
version: '3'
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
private_api:
container_name: private_api
build:
context: .
dockerfile: Dockerfile
target: base
args:
root_path: /
api_port: 5000
# command: bash -c "apt update && apt install -y curl && sleep infinity"
command: uvicorn src.core.server:app --host 0.0.0.0 --reload --reload-include src/*
ports:
- 5000: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
# env_file:
# - .env
volumes:
- ./src:/project/src
depends_on:
- mysql
- mysql_setup
networks:
botdetector-network: