-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
79 lines (73 loc) · 1.71 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
version: '3.2'
services:
freeradius:
image: 2stacks/freeradius-django
ports:
- "1812:1812/udp"
- "1813:1813/udp"
#volumes:
#- "./certs/freeradius:/etc/raddb/certs"
environment:
#- DB_NAME=radius
#- DB_HOST=postgres
#- DB_USER=debug
#- DB_PASS=debug
#- DB_PORT=5432
- API_HOST=django
- API_PORT=8000
- API_PROTOCOL=http
- API_TOKEN=djangofreeradiusapitoken
- RADIUS_SSL_MODE=prefer
#- RADIUS_KEY=testing123
#- RADIUS_CLIENTS=10.0.0.0/24
- RADIUS_DEBUG=yes
depends_on:
- postgres
- django
restart: always
networks:
- backend
django:
build:
context: .
dockerfile: ./compose/django/Dockerfile
image: 2stacks/django-freeradius
depends_on:
- postgres
volumes:
- ./django-freeradius/tests:/app
environment:
- POSTGRES_HOST=postgres
- POSTGRES_PORT=5432
- POSTGRES_DB=radius
- POSTGRES_USER=debug
- POSTGRES_PASSWORD=debug
ports:
- "8000:8000"
networks:
- backend
command: /start
postgres:
image: postgres:10-alpine
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./certs/postgres/server.crt:/server.crt
- ./certs/postgres/server.key:/server.key
- ./certs/postgres/ca.crt:/ca.crt
environment:
- POSTGRES_DB=radius
- POSTGRES_USER=debug
- POSTGRES_PASSWORD=debug
restart: always
networks:
- backend
command: postgres -c ssl=on -c ssl_key_file=/server.key -c ssl_cert_file=/server.crt
volumes:
postgres_data: {}
networks:
backend:
ipam:
config:
- subnet: 10.0.0.0/24