-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
77 lines (71 loc) · 2.15 KB
/
docker-compose.prod.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
version: "3.9"
services:
web:
container_name: backend
image: "${WEB_IMAGE}"
command: gunicorn server.wsgi:application --bind 0.0.0.0:8000 -w 9
# command: gunicorn server.asgi:application --bind 0.0.0.0:8000 -w 17 -k uvicorn.workers.UvicornWorker
# command: daphne server.asgi:application --port 8000 --bind 0.0.0.0
volumes:
- django_static_volume:/usr/src/app/static
- media:/usr/src/app/media
env_file: .env
react:
container_name: frontend
image: "${FRONTEND_IMAGE}"
volumes:
- react_static_volume:/usr/src/app/build/static
depends_on:
- web
env_file:
- .env
tfserving_classifier_hsv:
container_name: tfserving_classifier_hsv
image: "${TENSORFLOW_IMAGE_HSV}"
depends_on:
- web
tfserving_classifier_ssim:
container_name: tfserving_classifier_ssim
image: "${TENSORFLOW_IMAGE_SSIM}"
depends_on:
- web
celery:
container_name: celery
image: "${CELERY_IMAGE}"
command: celery -A server worker --without-heartbeat --without-gossip --without-mingle
#command: celery -A server worker -l info -Ofair -P eventlet -c 1000 — without-gossip — without-mingle — without-heartbeat
volumes:
- django_static_volume:/usr/src/app/static
- media:/usr/src/app/media
env_file:
- .env
nginx:
container_name: nginx
restart: always
image: "${NGINX_IMAGE}"
volumes:
- django_static_volume:/usr/src/app/django_files/static
- react_static_volume:/usr/src/app/react_files/static
- media:/usr/src/app/media
sysctls:
net.ipv4.ip_local_port_range: "1024 65535"
net.ipv4.tcp_tw_reuse: "1"
net.ipv4.tcp_fin_timeout: "15"
net.core.somaxconn: "4096"
net.ipv4.tcp_max_syn_backlog: "20480"
net.ipv4.tcp_max_tw_buckets: "400000"
net.ipv4.tcp_no_metrics_save: "1"
net.ipv4.tcp_rmem: "4096 87380 16777216"
net.ipv4.tcp_syn_retries: "2"
net.ipv4.tcp_synack_retries: "2"
net.ipv4.tcp_wmem: "4096 65536 16777216"
ports:
- "80:80"
depends_on:
- web
- react
volumes:
postgres_data:
django_static_volume:
react_static_volume:
media: