Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
117 lines (109 loc) · 2.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
117 lines (109 loc) · 2.41 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
services:
redis:
image: redis:7-alpine
user: "redis"
read_only: true
tmpfs:
- /tmp
pids_limit: 64
mem_limit: 256m
cpus: "0.25"
restart: always
networks:
- app
command: redis-server --save "" --appendonly no
backend:
build:
context: ./backend
command: gunicorn -w 2 -b 0.0.0.0:5000 app.app:app
user: "10001:10001"
read_only: true
tmpfs:
- /tmp
- /var/tmp
- /tmp/nexory-logs
pids_limit: 128
mem_limit: 512m
cpus: "0.5"
env_file:
- ./backend/.env
restart: always
depends_on:
- redis
- clamav
networks:
app:
ipv4_address: 172.19.0.10
volumes:
- avatar_uploads:/app/static/uploads/avatars
- avatar_quarantine:/app/static/uploads/avatar-quarantine
environment:
AVATAR_ENABLE_MALWARE_SCAN: "true"
AVATAR_CLAMD_HOST: clamav
AVATAR_CLAMD_PORT: "3310"
AVATAR_QUARANTINE_FOLDER: /app/static/uploads/avatar-quarantine
healthcheck:
test: ["CMD-SHELL", "python -c 'import socket; s=socket.socket(); s.settimeout(2); s.connect((\"127.0.0.1\",5000)); s.close()' || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
clamav:
image: clamav/clamav:latest
user: "clamav"
read_only: true
tmpfs:
- /tmp
- /run/clamav
pids_limit: 128
mem_limit: 768m
cpus: "0.5"
restart: always
networks:
- app
volumes:
- clamav_db:/var/lib/clamav
healthcheck:
test: ["CMD-SHELL", "clamdscan --version >/dev/null 2>&1 || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
frontend:
build:
context: ./frontend
user: "nginx"
read_only: true
tmpfs:
- /tmp
- /var/cache/nginx:mode=1777
- /var/run:mode=1777
- /var/log/nginx:mode=1777
pids_limit: 64
mem_limit: 256m
cpus: "0.25"
ports:
- "8080:80"
restart: always
depends_on:
backend:
condition: service_healthy
networks:
- app
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 30s
networks:
app:
driver: bridge
ipam:
config:
- subnet: 172.19.0.0/16
gateway: 172.19.0.1
volumes:
avatar_uploads:
avatar_quarantine:
clamav_db: