-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
88 lines (84 loc) · 2.3 KB
/
docker-compose.yml
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
version: '3.1'
services:
radius_server:
container_name: ${COMPOSE_PROJECT_NAME}_radius
hostname: radius.${RADIUS_REALM}
restart: always
build:
context: ./radius
args:
- DB_IP=${DB_IP}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_HOST=${MYSQL_HOST}
- MYSQL_PORT=${MYSQL_PORT}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- RADIUS_REALM=${RADIUS_REALM}
- RADIUS_SECRET=${RADIUS_SECRET}
- CERT_HOST=${CERT_HOST}
- TZ=${TZ}
- TLS_CACHE_DIR=${TLS_CACHE_DIR}
secrets:
- id_rsa
- Google_sLDAP.crt
- Google_sLDAP.key
networks:
rad_vlan:
ipv4_address: ${RADIUS_IP}
ports:
- "80:80/tcp"
- "1812:1812/udp"
- "1813:1813/udp"
volumes:
- ./radius/conf/clients.conf:/etc/freeradius/3.0/clients.conf
- ./radius/conf/set_group_vlan:/etc/freeradius/3.0/policy.d/set_group_vlan
- ./radius/conf/eap:/etc/freeradius/3.0/mods-available/eap
- ./radius/conf/ldap:/etc/freeradius/3.0/mods-available/ldap
links:
- mysql_db:database
depends_on:
- "mysql_db"
mysql_db:
container_name: ${COMPOSE_PROJECT_NAME}_mysql
hostname: mariadb.${RADIUS_REALM}
restart: always
build:
context: ./mariadb
args:
- DB_IP=${DB_IP}
- MYSQL_CONTAINER_USER=mysql
- MYSQL_CONTAINER_GROUP=mysql
- MYSQL_DATA_DIR=/var/lib/mysql
- MYSQL_LOG_DIR=/var/log/mysql
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- RADIUS_IP=${RADIUS_IP}
- TZ=${TZ}
networks:
rad_vlan:
ipv4_address: ${DB_IP}
volumes:
- ./mariadb/data:/var/lib/mysql
- ./mariadb/log/:/var/log/mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_CONTAINER_USER: "mysql"
MYSQL_CONTAINER_GROUP: "mysql"
MYSQL_DATABASE: ${MYSQL_DATABASE}
networks:
rad_vlan:
driver: bridge
ipam:
driver: default
config:
- subnet: ${VLAN_SUBNET}
secrets:
id_rsa:
file: ./radius/id_rsa.txt
Google_sLDAP.crt:
file: ./radius/certs/Google_sLDAP.crt
Google_sLDAP.key:
file: ./radius/certs/Google_sLDAP.key