-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
92 lines (83 loc) · 1.76 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
82
83
84
85
86
87
88
89
90
91
92
version: '3.8'
services:
ma_app:
container_name: ma_app
image: macwdo/ma_app:latest
ports:
- "8080:8000"
stdin_open: true
tty: true
command: python manage.py runserver 0.0.0.0:8000
env_file: .env
volumes:
- ./src:/home/app
restart: unless-stopped
depends_on:
- db_ma_app
- rmq_ma_app
- nginx_ma_app
nginx_ma_app:
container_name: nginx_ma_app
build:
context: nginx/
dockerfile: Dockerfile
volumes:
- ./staticfiles:/home/app/staticfiles
ports:
- 80:80
db_ma_app:
container_name: db_ma_app
image: postgres:latest
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_PASSWORD: 12345
POSTGRES_USER: postgres
POSTGRES_DB: db_app
ports:
- "5431:5432"
rmq_ma_app:
container_name: rmq_ma_app
image: rabbitmq:latest
restart: always
ports:
- 5673:5673
- 8083:15673
worker_ma_app:
container_name: worker_ma_app
image: macwdo/ma_app:latest
command: celery -A project worker --loglevel=INFO
volumes:
- ./src:/home/app
env_file: .env
restart: always
depends_on:
- rmq_ma_app
beat_ma_app:
container_name: beat_ma_app
image: macwdo/ma_app:latest
command: celery -A project beat -l debug
volumes:
- ./src:/home/app
env_file: .env
restart: always
depends_on:
- worker_ma_app
- rmq_ma_app
flower_ma_app:
container_name: flower_ma_app
image: macwdo/ma_app:latest
command: celery -A project flower
volumes:
- flower_data:/data
ports:
- "5555:5555"
env_file: .env
restart: always
depends_on:
- rmq_ma_app
- worker_ma_app
- beat_ma_app
volumes:
postgres_data:
flower_data: