forked from SaltieRL/DistributedReplays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (53 loc) · 1.51 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
version: "3"
services:
postgres:
image: postgres:10-alpine
restart: always
environment:
POSTGRES_PASSWORD: postgres
network_mode: service:flask
volumes:
- "./data/postgres:/var/lib/postgresql/data"
redis:
image: redis:4-alpine
restart: always
network_mode: service:flask
volumes:
- "./.data/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:
- ./:/app:rw
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:
- ./:/app:rw
depends_on:
- redis
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