-
Notifications
You must be signed in to change notification settings - Fork 34
/
docker-compose.yml
78 lines (73 loc) · 2.01 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
version: "3.8"
services:
postgres:
restart: always
image: postgis/postgis
container_name: pgsql
environment:
- POSTGRES_DB=raw
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=admin
ports:
- "5434:5432"
volumes:
- ./postgres-data:/var/lib/postgresql/data
- ./tests/fixtures/pokhara.sql:/docker-entrypoint-initdb.d/pokhara.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d raw"]
interval: 60s
timeout: 30s
retries: 5
start_period: 10s
redis:
image: redis
container_name: redis
ports:
- "6379:6379"
api:
build: .
container_name: rawdataapi
command: uvicorn API.main:app --reload --host 0.0.0.0 --port 8000 --no-use-colors --proxy-headers
ports:
- 8000:8000
volumes:
- "./API:/home/appuser/API"
- "./src:/home/appuser/src"
- "./docker-compose-config.txt:/home/appuser/config.txt"
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
worker:
build: .
container_name: rawdata-worker
command: celery --app API.api_worker worker --loglevel=INFO --queues="raw_ondemand" -n 'default_worker'
volumes:
- "./API:/home/appuser/API"
- "./src:/home/appuser/src"
- "./docker-compose-config.txt:/home/appuser/config.txt"
depends_on:
api:
condition: service_started
redis:
condition: service_started
postgres:
condition: service_healthy
flower:
build: .
container_name: rawdata-flower
command: celery --broker=redis://redis:6379// --app API.api_worker flower --port=5555 --queues="raw_daemon,raw_ondemand"
ports:
- 5555:5555
volumes:
- "./API:/home/appuser/API"
- "./src:/home/appuser/src"
- "./docker-compose-config.txt:/home/appuser/config.txt"
depends_on:
api:
condition: service_started
redis:
condition: service_started
postgres:
condition: service_healthy