-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
139 lines (129 loc) · 3.37 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
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
version: '3.8'
services:
backend:
build:
dockerfile: ./compose/backend/Dockerfile
context: .
command: bash -c "uvicorn --port 8000 --host 0.0.0.0 app.main:app"
env_file:
- .env
volumes:
- ./data:/data
ports:
- 127.0.0.1:8000:8000
depends_on:
- db
emulator:
build:
dockerfile: ./compose/api_emulator/Dockerfile
context: .
command: bash -c "python start_all.py"
env_file:
- .env
ports:
- 0.0.0.0:8001:8001
- 0.0.0.0:8002:8002
- 0.0.0.0:8003:8003
- 0.0.0.0:8004:8004
- 0.0.0.0:8005:8005
- 0.0.0.0:8006:8006
- 0.0.0.0:8007:8007
- 0.0.0.0:8008:8008
- 0.0.0.0:8009:8009
- 0.0.0.0:8010:8010
- 0.0.0.0:8011:8011
- 0.0.0.0:8012:8012
- 0.0.0.0:8013:8013
- 0.0.0.0:8014:8014
db:
image: mongo:latest
env_file:
- .env
ports:
- "27017:27017"
volumes:
- ./db:/data/db
broker:
image: rabbitmq:3.8-management-alpine
environment:
- RABBITMQ_DEFAULT_USER=${RMQ_USER}
- RABBITMQ_DEFAULT_PASS=${RMQ_PASS}
ports:
- "127.0.0.1:15672:15672"
- "127.0.0.1:5672:5672"
restart: unless-stopped
history_module:
build:
dockerfile: ./compose/api_history_module/Dockerfile
context: .
command: bash -c "celery -A api_call_task worker -B"
env_file:
- .env
depends_on:
- db
- backend
- broker
frontend:
build:
dockerfile: ./compose/frontend/Dockerfile
context: .
restart: unless-stopped
nginx:
build:
dockerfile: ./compose/nginx/Dockerfile
context: .
restart: unless-stopped
depends_on:
- backend
- frontend
ports:
- 127.0.0.1:${HTTP_PORT}:80
volumes:
- ./mounts/uwsgi:/uwsgi
- ./mounts/logs/nginx:/var/log/nginx
- ./mounts/media:/webapp/media:ro
- ./mounts/static:/webapp/static:ro
redis:
image: redis:latest
restart: always
ports:
- 6379:6379
command: ["redis-server", "--bind", "redis", "--port", "6379"]
backend_fuzzing:
build:
dockerfile: ./compose/fuzzer/Dockerfile
context: .
command: bash -c "python3 manage.py makemigrations &&
python3 manage.py makemigrations fuzzing &&
python3 manage.py migrate &&
python3 manage.py runserver 0.0.0.0:8016"
volumes:
- ./fuzzer/backend:/app/
ports:
- 8016:8016 # sets the port that maps to internal port in docker container
environment:
- DEBUG=1 # не задействовано, прописано в settings.py
- SECRET_KEY={SECRET_KEY} # # не задействовано, прописано в settings.py
- CELERY_BROKER=redis://redis:6379/0 # не задействовано, прописано в settings.py
- CELERY_BACKEND=redis://redis:6379/0 # не задействовано, прописано в settings.py
depends_on:
- redis
env_file:
- .env
celery_fuzzing:
build:
dockerfile: ./compose/fuzzer/Dockerfile
context: .
command: celery -A fuzzing worker -l info
volumes:
- ./fuzzer/backend:/app
environment:
- DEBUG=1
- SECRET_KEY={SECRET_KEY}
- CELERY_BROKER=redis://redis:6379
- CELERY_BACKEND=redis://redis:6379
depends_on:
- backend_fuzzing
- redis
env_file:
- .env