-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdocker-compose-scale2.yaml
93 lines (86 loc) · 2.01 KB
/
docker-compose-scale2.yaml
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
version: '3'
networks:
proxynet:
driver: bridge
services:
# Restart failed containers automatically
autoheal:
restart: always
image: lostlakkris/autoheal
environment:
- AUTOHEAL_CONTAINER_LABEL=all
- AUTOHEAL_INTERVAL=10
- AUTOHEAL_START_PERIOD=30 # Wait for the VPNs to establish
- AUTOHEAL_DEFAULT_STOP_TIMEOUT=20
- CURL_TIMEOUT=30
volumes:
- /var/run/docker.sock:/var/run/docker.sock
chrome-haproxy:
build:
context: haproxy
networks:
- proxynet
ports:
- "${CHROME_RDP_PORT:-3000}:3000"
restart: unless-stopped
depends_on:
- chrome-vpn1
- chrome-vpn2
environment:
FRONTEND_PORT: 3000
BACKENDS_PORT: 3000
BACKENDS: "chrome-vpn1 chrome-vpn2"
HTTPCHK: "HEAD /health"
HTTPCHKPORT: 8080
proxy-haproxy:
build:
context: haproxy
networks:
- proxynet
ports:
- "${PROXY_PORT:-3001}:3001"
restart: unless-stopped
depends_on:
- chrome-vpn1
- chrome-vpn2
environment:
FRONTEND_PORT: 3001
BACKENDS_PORT: 3001
BACKENDS: "chrome-vpn1 chrome-vpn2"
HTTPCHK: "HEAD /health"
HTTPCHKPORT: 8080
chrome-vpn1: &chrome-vpn
image: ericdraken/chrome-vpn:armv7
restart: unless-stopped
cap_add:
- NET_ADMIN # Needed for VPN tunnel adapter
networks:
- proxynet
expose:
- 3000 # Chrome Debug Protocol port
- 3001 # Chrome bypass port
- 8080 # Actuator port
dns:
- "${DNS_SERVER_1:-9.9.9.9}"
- "${DNS_SERVER_2:-1.1.1.1}"
volumes:
- ./.chromium.sh:/app/chromium/chromium.sh:ro
- /dev/shm:/dev/shm # Use shared memory with the host
- ./usedvpns:/usedvpns
tmpfs:
- /tmp
env_file:
- ./env/chrome-vpn.env
- ./env/password.env
environment:
MAX_CONCURRENT_SESSIONS: 3
chrome-vpn2:
<<: *chrome-vpn
echo:
build:
context: echo
restart: unless-stopped
networks:
- proxynet
expose:
- 8080