-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.linux.yml
More file actions
29 lines (27 loc) · 982 Bytes
/
Copy pathdocker-compose.linux.yml
File metadata and controls
29 lines (27 loc) · 982 Bytes
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
# Linux override — host networking for radius-server
#
# On Linux, `network_mode: host` gives the radius container direct access
# to the host network stack. This means:
# - The radius container sees the host's loopback (127.0.0.1)
# - The DB port must be exposed on 127.0.0.1 so radius can reach it
#
# Applied automatically by scripts/start.sh on Linux.
# Usage: docker compose -f docker-compose.yml -f docker-compose.linux.yml up -d
services:
db:
# Expose MariaDB on host loopback so radius (host network) can reach it
ports:
- "127.0.0.1:3306:3306"
radius:
# Host networking — only works on Linux
network_mode: host
environment:
# On host networking, DB is on the host's loopback
DB_HOST: 127.0.0.1
# Healthcheck: verify FreeRADIUS is listening on auth port
healthcheck:
test: [ "CMD-SHELL", "nc -z -w2 127.0.0.1 1812 || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s