-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (86 loc) · 2.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
89 lines (86 loc) · 2.08 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
version: '3.8'
services:
sush-server:
build:
context: .
dockerfile: Dockerfile
args:
VERSION: 1.2.0
BUILD_DATE: "${BUILD_DATE:-unknown}"
VCS_REF: "${VCS_REF:-unknown}"
image: sush-core:latest
container_name: sush-server
restart: unless-stopped
ports:
- "8443:8443"
- "8080:8080"
environment:
- PYTHONUNBUFFERED=1
- SUSH_LOG_LEVEL=INFO
volumes:
- ./config:/app/config:ro
command: ["python", "examples/server_example.py", "--mode", "basic", "--address", "0.0.0.0", "--ports", "8443", "8080"]
healthcheck:
test: ["CMD", "python", "-c", "import socket; s = socket.socket(); s.settimeout(5); result = s.connect_ex(('127.0.0.1', 8443)); s.close(); exit(0 if result == 0 else 1)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- sush-network
# Security hardening
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
read_only: true
tmpfs:
- /tmp:size=100M,mode=1777
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
sush-bridge:
build:
context: .
dockerfile: Dockerfile
args:
VERSION: 1.2.0
image: sush-core:latest
container_name: sush-bridge
restart: unless-stopped
ports:
- "443:443"
- "80:80"
- "53:53/udp"
environment:
- PYTHONUNBUFFERED=1
- SUSH_LOG_LEVEL=INFO
command: ["python", "examples/server_example.py", "--mode", "bridge", "--address", "0.0.0.0", "--ports", "443", "80", "53"]
networks:
- sush-network
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
cap_add:
- NET_BIND_SERVICE
read_only: true
tmpfs:
- /tmp:size=100M,mode=1777
deploy:
resources:
limits:
cpus: '2'
memory: 1G
networks:
sush-network:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1500