forked from hotosm/fAIr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
81 lines (74 loc) · 1.7 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
version: "3.8"
services:
postgres:
restart: always
image: postgis/postgis
container_name: pgsql
environment:
- POSTGRES_DB=ai
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=admin
volumes:
- ./postgres-data:/var/lib/postgresql/data
ports:
- "5434:5432"
redis:
image: redis
container_name: redis
ports:
- "6379:6379"
backend-api:
build:
context: ./backend
dockerfile: Dockerfile
container_name: api
command: python manage.py runserver 0.0.0.0:8000
ports:
- 8000:8000
volumes:
- ./backend:/app
- ${RAMP_HOME}:/RAMP_HOME
- ${TRAINING_WORKSPACE}:/TRAINING_WORKSPACE
depends_on:
- redis
- postgres
backend-worker:
build:
context: ./backend
dockerfile: Dockerfile
container_name: worker
command: celery -A aiproject worker --loglevel=INFO --concurrency=1
deploy:
resources:
reservations:
devices:
- driver: nvidia
capabilities: [gpu]
volumes:
- ./backend:/app
- ${RAMP_HOME}:/RAMP_HOME
- ${TRAINING_WORKSPACE}:/TRAINING_WORKSPACE
depends_on:
- backend-api
- redis
- postgres
worker-dashboard:
image: mher/flower
container_name: flower
command: celery --broker=redis://redis:6379// flower --address=0.0.0.0 --port=5000
ports:
- 5500:5000
depends_on:
- backend-api
- redis
- backend-worker
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.frontend
container_name: frontend
command: npm start -- --host 0.0.0.0 --port 3000
ports:
- 3000:3000
depends_on:
- backend-api