-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-dev.yml
142 lines (135 loc) · 3.21 KB
/
docker-compose-dev.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
services:
nginx:
build:
context: ./nginx
ports:
- 80:80
- 443:443
volumes:
- $PWD/nginx/sites:/etc/nginx/sites-available
# Uncomment the next line to add your ssl certificate and key to Nginx
# - /path/to/your/certificate_and_key:/etc/nginx/ssl
depends_on:
- web
networks:
- backend
web:
image: "secretaryweb-base:${VERSION}"
links:
- secretary_mongo:mongo
- queue_sender:rabbitmq
volumes:
- $PWD/celery_task:/app/celery_task:delegated
- $PWD/models:/app/models:delegated
- $PWD/module:/app/module:delegated
- $PWD/templates:/app/templates:delegated
- $PWD/view:/app/view:delegated
- $PWD/log:/app/log:cached
- $PWD/client_secret.json:/app/client_secret.json:delegated
- $PWD/setting.py:/app/setting.py:delegated
- $PWD/main.py:/app/main.py:delegated
depends_on:
- queue_sender
- secretary_mongo
ports:
- 5000:5000
- 5678:5678
networks:
- backend
entrypoint: [
"poetry",
"run",
"flask",
"--app",
"main:app",
"run",
"--host",
"0.0.0.0",
"--debug"
]
celery_worker:
image: "secretaryweb-base:${VERSION}"
links:
- secretary_mongo:mongo
- queue_sender:rabbitmq
volumes:
- $PWD/celery_task:/app/celery_task:delegated
- $PWD/models:/app/models:delegated
- $PWD/module:/app/module:delegated
- $PWD/log_docker_celery:/app/log_docker_celery:cached
- $PWD/templates:/app/templates:delegated
- $PWD/setting.py:/app/setting.py:delegated
- $PWD/main.py:/app/main.py:delegated
depends_on:
- queue_sender
- secretary_mongo
environment:
- C_FORCE_ROOT=true
networks:
- backend
entrypoint: [
"poetry",
"run",
"celery",
"-A",
"celery_task",
"worker",
"-B",
"-l",
"info",
"-O",
"fair",
"-c",
"4",
"--logfile",
"./log_docker_celery/log.log"
]
worker:
image: "secretaryweb-base:${VERSION}"
links:
- secretary_mongo:mongo
- queue_sender:rabbitmq
volumes:
- $PWD/celery_task:/app/celery_task:delegated
- $PWD/models:/app/models:delegated
- $PWD/module:/app/module:delegated
- $PWD/templates:/app/templates:delegated
- $PWD/view:/app/view:delegated
- $PWD/log:/app/log:cached
- $PWD/log_docker_celery:/app/log_docker_celery:cached
- $PWD/setting.py:/app/setting.py:delegated
- $PWD/main.py:/app/main.py:delegated
depends_on:
- queue_sender
- secretary_mongo
networks:
- backend
environment:
- PYTHONPATH=/app
command: sh
secretary_mongo:
image: "mongo:6.0.6-jammy"
ports:
- 27017:27017
volumes:
- mongodata:/data
- mongodb:/data/db
- mongoconfig:/data/configdb
networks:
- backend
queue_sender:
image: "rabbitmq:3.11.18-management-alpine"
depends_on:
- secretary_mongo
networks:
- backend
volumes:
- rabbitdata:/var/lib/rabbitmq
networks:
backend:
driver: bridge
volumes:
mongodata: {}
mongodb: {}
mongoconfig: {}
rabbitdata: {}