-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
159 lines (152 loc) · 3.78 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: "3"
services:
pdns-db:
image: mysql/mysql-server:5.7
deploy:
resources:
limits:
cpus: "0.50"
memory: 128M
reservations:
cpus: "0.25"
memory: 128M
networks:
- default
environment:
- MYSQL_ROOT_PASSWORD=somer00tpassw0rd
- MYSQL_DATABASE=powerdns
- MYSQL_USER=pdns
- MYSQL_PASSWORD=somepassword
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 10s
retries: 5
pdns-server:
build:
dockerfile: Dockerfile
context: pdns/
image: connectitnet/pdns
ports:
- "5353:53/udp"
networks:
- default
environment:
- DEBUG=true
- BACKEND=gmysql
- PDNS_gmysql_user=pdns
- PDNS_gmysql_password=somepassword
- PDNS_gmysql_host=pdns-db
- PDNS_master=yes
- PDNS_api=yes
- PDNS_api_key=someapikey
- PDNS_webserver=yes
- PDNS_webserver_address=0.0.0.0
- PDNS_webserver_password=somepassword
- PDNS_webserver-allow-from=0.0.0.0/0,::/0
- PDNS_version_string=anonymous
- PDNS_default_ttl=3600
- PDNS_soa_minimum_ttl=36000
- PDNS_default_soa_name=ns1.example.com
- PDNS_default_soa_mail=hostmaster.example.com
depends_on:
- pdns-db
recursor:
build:
dockerfile: Dockerfile
context: pdns-recursor/
image: connectitnet/pdns-recursor
hostname: recursor
ports:
- "53:53/udp"
networks:
- default
# environment:
# - BACKEND=mysql
# - PDNS_master=yes
# - PDNS_api=yes
# - PDNS_api_key=someapikey
# - PDNS_webserver=yes
# - PDNS_webserver_address=0.0.0.0
# - PDNS_webserver_password=somepassword
# - PDNS_version_string=anonymous
# - PDNS_default_ttl=3600
# - PDNS_soa_minimum_ttl=36000
# - PDNS_default_soa_name=ns1.example.com
# - PDNS_default_soa_mail=hostmaster.example.com
depends_on:
- pdns-server
pdnsadmin-db:
image: mysql/mysql-server:5.7
deploy:
resources:
limits:
cpus: "0.50"
memory: 128M
reservations:
cpus: "0.25"
memory: 128M
networks:
- default
environment:
- MYSQL_ROOT_PASSWORD=somer00tpassw0rd
- MYSQL_DATABASE=pdnsadmin
- MYSQL_USER=pdnsadmin
- MYSQL_PASSWORD=somepassword
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 10s
retries: 5
powerdns-admin:
build:
dockerfile: Dockerfile
context: pdns-admin/
image: connectitnet/powerdns-admin:latest
deploy:
resources:
limits:
cpus: "0.50"
memory: 128M
reservations:
cpus: "0.25"
memory: 128M
logging:
driver: json-file
options:
max-size: 128M
networks:
- default
volumes:
- staticfiles:/opt/powerdns-admin/app/static/
- uploads:/opt/powerdns-admin/upload/
environment:
DBBACKEND: mysql
PDNS_API_KEY: someapikey
PDNS_ADMIN_SIGNUP_ENABLED: "True"
PDNS_ADMIN_SQLA_DB_USER: pdnsadmin
PDNS_ADMIN_SQLA_DB_NAME: pdnsadmin
PDNS_ADMIN_SQLA_DB_PASSWORD: somepassword
PDNS_ADMIN_SQLA_DB_HOST: pdnsadmin-db
PDNS_HOST: pdns-server
depends_on:
- pdnsadmin-db
- pdns-server
nginx:
command: nginx -c /etc/nginx/nginx.conf
image: nginx:alpine
depends_on:
- powerdns-admin
ports:
- 8000:8000
volumes:
- staticfiles:/opt/powerdns-admin/app/static/:ro
- uploads:/opt/powerdns-admin/upload/:ro
- ./pdnsadmin-nginx.conf:/etc/nginx/nginx.conf:ro
networks:
default:
volumes:
staticfiles:
driver: local
uploads:
driver: local
powerdns-mysql-data:
driver: local