Repository navigation
Expand file tree
/
Copy pathdocker-compose-minimal.yml
More file actions
68 lines (67 loc) · 2.37 KB
/
Copy pathdocker-compose-minimal.yml
File metadata and controls
68 lines (67 loc) · 2.37 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
services:
aps:
image: r4ulcl/wifichallengelab-aps:latest
restart: on-failure # Automatically restart on failure
container_name: WiFiChallengeLab-APs
env_file:
- ./wlan_config
volumes:
- ./certs:/root/certs/:ro
- ./certs:/root/mgt/certs/:ro
- ./certs:/var/www/html/.internalCA/
- /lib/modules:/lib/modules
- /usr/src:/usr/src
- /usr/lib:/host_usr_lib:ro
- ./logsAP:/root/logs/
healthcheck:
test:
- CMD-SHELL
- |
ip netns exec ns-ap /bin/bash -c '
curl -f -s -o /dev/null http://localhost/login.php || exit 1;
curl -s -o /dev/null http://localhost:8080 || exit 2;
pgrep -x freeradius >/dev/null || exit 3;
[ "$(pgrep -xc host_aps_apd)" -ge 18 ] || exit 4;
phy_count="$$(iw dev | grep -c "^phy#")";
wlan_count="$$(iw dev | grep -c "^[[:space:]]*Interface wlan[0-9][0-9]*$")";
echo "AP radio assignment: $${phy_count}/34 PHY devices, $${wlan_count}/34 WLAN interfaces (wlan6-wlan39)";
[ "$${phy_count}" -eq 34 ] || exit 5;
[ "$${wlan_count}" -eq 34 ] || exit 6'
interval: 15s
timeout: 10s
retries: 5
start_period: 45s
start_interval: 3s
network_mode: host #NETNS
privileged: true #NETNS
clients:
image: r4ulcl/wifichallengelab-clients:latest
restart: on-failure # Automatically restart on failure
container_name: WiFiChallengeLab-Clients
env_file:
- ./wlan_config
volumes:
- ./certs:/root/certs/:ro
- /lib/modules:/lib/modules
- ./logsClient:/root/logs/
depends_on:
- aps
network_mode: host #NETNS
privileged: true #NETNS
healthcheck:
test:
- CMD-SHELL
- |
ip netns exec ns-client /bin/bash -c '
curl -s -o /dev/null http://localhost || exit 1;
[ "$(pgrep -c wpa_wifichallen)" -ge 17 ] || exit 2;
phy_count="$$(iw dev | grep -c "^phy#")";
wlan_count="$$(iw dev | grep -c "^[[:space:]]*Interface wlan[0-9][0-9]*$")";
echo "Clients radio assignment: $${phy_count}/30 PHY devices, $${wlan_count}/30 WLAN interfaces (wlan40-wlan69)";
[ "$${phy_count}" -eq 30 ] || exit 3;
[ "$${wlan_count}" -eq 30 ] || exit 4'
interval: 15s
timeout: 10s
retries: 5
start_period: 45s
start_interval: 3s