-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.production.yml
More file actions
121 lines (117 loc) · 2.52 KB
/
Copy pathcompose.production.yml
File metadata and controls
121 lines (117 loc) · 2.52 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
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
name: video-hw-proxyapi
services:
app:
build:
context: .
target: production
env_file:
- .env
command: python main.py
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
volumes:
- ./outputs:/app/outputs
restart: "no"
pids_limit: 128
mem_limit: 512m
cpus: 1.0
logging:
driver: json-file
options:
max-size: 20m
max-file: "3"
web:
build:
context: .
target: production
env_file:
- .env
command: python app.py
volumes:
- ./outputs:/app/outputs
restart: unless-stopped
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
pids_limit: 128
mem_limit: 512m
cpus: 1.0
logging:
driver: json-file
options:
max-size: 20m
max-file: "3"
bot:
build:
context: .
target: production
env_file:
- .env
command: python bot.py
volumes:
- ./outputs:/app/outputs
restart: unless-stopped
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
tmpfs:
- /tmp:rw,noexec,nosuid,size=64m
pids_limit: 128
mem_limit: 256m
cpus: 0.5
logging:
driver: json-file
options:
max-size: 20m
max-file: "3"
nginx:
image: nginx:1.27-alpine
depends_on:
- web
environment:
NGINX_DOMAIN: ${NGINX_DOMAIN:?Set NGINX_DOMAIN at deploy time}
ports:
- "80:80"
- "443:443"
command:
- /bin/sh
- -c
- envsubst '$$NGINX_DOMAIN' < /etc/nginx/templates/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- CHOWN
- NET_BIND_SERVICE
- SETGID
- SETUID
tmpfs:
- /etc/nginx/conf.d:rw,noexec,nosuid,size=1m
- /var/cache/nginx:rw,noexec,nosuid,size=64m
- /var/run:rw,noexec,nosuid,size=16m
- /tmp:rw,noexec,nosuid,size=32m
volumes:
- ./docker/nginx/default.conf.template:/etc/nginx/templates/default.conf.template:ro
- ${SSL_CERTS_DIR:?Set SSL_CERTS_DIR at deploy time}:/etc/nginx/certs:ro
restart: unless-stopped
pids_limit: 64
mem_limit: 128m
cpus: 0.5
logging:
driver: json-file
options:
max-size: 20m
max-file: "3"