forked from pan-net/terraform-provider-powerdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (58 loc) · 1.7 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
version: "3"
services:
nginx:
image: nginx:1.17.2
volumes:
- ${PWD}/tests/files/nginx/nginx.conf:/etc/nginx/nginx.conf
- ${PWD}/tests/files/ssl/localhost/server.crt:/etc/nginx/cert.crt
- ${PWD}/tests/files/ssl/localhost/server.key:/etc/nginx/cert.key
ports:
- "4443:4443"
depends_on:
- pdns
mysql:
image: mariadb:10.4.7-bionic
environment:
MYSQL_ROOT_PASSWORD: secret
pdns:
image: psitrax/powerdns:v4.3.1
command:
- "--api"
- "--api-key=secret"
- "--webserver"
- "--webserver-address=0.0.0.0"
- "--webserver-allow-from=0.0.0.0/0"
- "--loglevel=10"
environment:
MYSQL_USER: root
MYSQL_PASS: secret
depends_on:
- mysql
ports:
- "8081:8081"
setup:
image: alpine:3.9
command:
- sh
- -c
- |
apk add --no-cache curl &&
while true; do
if curl -f http://pdns:8081/api -H "X-API-Key: secret"; then
break
fi
sleep 1
done
# this is used for records acc testing except SOA
curl -X POST http://pdns:8081/api/v1/servers/localhost/zones \
-d '{"name": "sysa.xyz.", "kind": "Native", "nameservers": ["ns1.sysa.xyz."]}' \
-H "X-API-Key: secret"
# this is used for SOA record testing
curl -X POST http://pdns:8081/api/v1/servers/localhost/zones \
-d '{"name": "test-soa-sysa.xyz.", "kind": "Native", "soa_edit_api": "", "nameservers": ["ns1.sysa.xyz."]}' \
-H "X-API-Key: secret"
curl -s -X POST http://pdns:8081/api/v1/servers/localhost/zones \
-d '{"name": "in-addr.arpa.", "kind": "Native", "nameservers": ["ns1.sysa.xyz."]}' \
-H "X-API-Key: secret"
depends_on:
- nginx