-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathdocker-compose.yml
76 lines (72 loc) · 2.42 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
version: "3"
services:
postgres:
image: postgres:10-alpine
restart: always
environment:
POSTGRES_PASSWORD: postgres
network_mode: service:flask
volumes:
- "calculated.gg.postgres:/var/lib/postgresql/data"
redis:
image: redis:4-alpine
restart: always
network_mode: service:flask
volumes:
- "calculated.gg.redis:/data"
flask:
build: .
image: distributed-replays-python
# The sleep is less than ideal but there seems to be a delay between
# when dockerize can connect to postgres and when our backend can
command: dockerize -timeout 30s -wait tcp://localhost:5432 -wait tcp://localhost:6379 sh -c "sleep 5 && python ./RLBotServer.py"
volumes:
# flask needs root and RLBotServer
- calculated.gg.root:/app:rw
- "./backend/:/app/backend"
- "./helpers/:/app/helpers"
- "./celery2.sh:/app/celery2.sh"
- "./celerycron.sh:/app/celerycron.sh"
- "./gunicorn_conf.py:/app/gunicorn_conf.py"
- "./RLBotServer.py:/app/RLBotServer.py" # there is also loader.py, which is identical. The command above uses RLBotServer.py.
ports:
# This container handles exporting the ports for every other container
# Those other containers link to this one
- 3000:3000
- 5432:5432
- 6379:6379
- 8000:8000
celery:
image: distributed-replays-python
command: dockerize -wait tcp://localhost:6379 celery -A backend.tasks.celery_tasks.celery worker --loglevel=INFO
network_mode: service:flask
volumes:
# uses the same root as flask, only needs to add celery shell scripts
- calculated.gg.root:/app:rw
- "./backend/:/app/backend"
- "./helpers/:/app/helpers"
- "./celery2.sh:/app/celery2.sh"
- "./celerycron.sh:/app/celerycron.sh"
- "./gunicorn_conf.py:/app/gunicorn_conf.py"
- "./RLBotServer.py:/app/RLBotServer.py" # there is also loader.py, which is identical. The command above uses RLBotServer.py.
depends_on:
- redis
- flask
webapp:
image: node:10-alpine
command: sh -c "cd /app && npm install && npm run start"
network_mode: service:flask
volumes:
- ./webapp/:/app:rw
# rabbitmq:
# image: rabbitmq:3-alpine
# container_name: ccgg-rabbitmq
# restart: always
# volumes:
# - "./.data/rabbitmq:/data"
# ports:
# - 5672:5672
volumes:
calculated.gg.postgres:
calculated.gg.redis:
calculated.gg.root: