-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (52 loc) · 1.21 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:8'
services:
app:
build: .
command: bash -c "uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload"
ports:
- "8000:8000"
depends_on:
- mongodb
mongodb:
image: mongo:latest
env_file:
- .env
ports:
- "27017:27017"
restart: always
volumes:
- ./data:/data/db
environment:
- "MONGO_INITDB_DATABASE=mydb"
- "MONGO_INITDB_ROOT_USERNAME=root"
- "MONGO_INITDB_ROOT_PASSWORD=pass"
command:
mongod --quiet --logpath /dev/null
redis:
container_name: redis
image: redis:6.2-alpine
celery_worker:
build: .
image: madefire/chordtest
command: celery -A app.celery_worker worker -l INFO
volumes:
- .:/app
environment:
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
depends_on:
- app
- redis
flower:
container_name: flower
build: .
command: celery -A app.celery_worker flower --port=5555
ports:
- 5556:5555
environment:
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
depends_on:
- app
- redis
- celery_worker