-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (86 loc) · 1.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
94 lines (86 loc) · 1.97 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
services:
app:
restart: on-failure
tty: true
build:
context: ./app
container_name: app
volumes:
- ./app/service/_main_.py:/home/appuser/project/_main_.py
- ./app/service/api:/home/appuser/project/api/
- ./app/service/apps:/home/appuser/project/apps/
- ./app/service/core:/home/appuser/project/core/
- ./app/service/locales:/home/appuser/project/locales/
env_file:
- ./app/.env
command: ['sh', '/home/appuser/project/local.entrypoint.sh']
ports:
- '8000:8000'
depends_on:
- mongodb
worker:
restart: on-failure
container_name: worker
build:
context: ./app
dockerfile: Dockerfile
env_file:
- ./app/.env
command: ["celery", '--workdir=/home/appuser/project', '-A', 'core.celery', 'worker', '-l', 'INFO']
depends_on:
- app
- redis
- mongodb
beat:
restart: on-failure
container_name: beat
build:
context: ./app
dockerfile: Dockerfile
env_file:
- ./app/.env
command: ["celery", '-A', 'core.celery', 'beat', '-l', 'INFO']
depends_on:
- app
- redis
- mongodb
flower:
restart: on-failure
image: mher/flower
command:
[
"celery",
"--broker=redis://redis:6379",
"--result-backend=mongodb://root:root@mongodb:27017/celery",
"flower",
"--broker_api=redis://redis:6379",
"--address=0.0.0.0",
"--port=5555",
"--basic-auth=admin:admin",
]
ports:
- "5555:5555"
depends_on:
- app
- redis
- mongodb
mongodb:
image: mongo:latest
restart: on-failure
container_name: mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
ports:
- 27017:27017
expose:
- 27017
volumes:
- mongodb_data:/data/db
redis:
image: redis:latest
container_name: redis
ports:
- "6379:6379"
volumes:
mongodb_data: