[flask_seasurf.py:344] WARNING - Forbidden (CSRF token missing or incorrect.): /admin/setting/pdns
# [Installing PowerDNS – ForestRacks]
# ( https://help.forestracks.com/cloud/docker-compose/install-powerdns)
services:
db:
image: mariadb:11.6.2-noble
container_name: pdns-db
restart: always
networks:
macvlan_network:
ipv4_address: 192.168.10.17
environment:
- TZ=Asia/Shanghai
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=powerdnsadmin
- MYSQL_USER=pdns
- MYSQL_PASSWORD=H46beg4Bryhsf34g
# ports:
# - 127.0.0.1:3306:3306
volumes:
- ./pda-mysql:/var/lib/mysql
pdns:
image: pschiffe/pdns-mysql:4.9
container_name: pdns
hostname: pdns
domainname: dns.example.com
restart: always
networks:
macvlan_network:
ipv4_address: 192.168.10.18
depends_on:
- db
links:
- "db:mysql"
# ports:
# - "192.168.53.72:53:53"
# - "192.168.53.72:53:53/udp"
# - "8081:8081"
environment:
- TZ=Asia/Shanghai
- PDNS_gmysql_host=192.168.10.17
- PDNS_gmysql_port=3306
- PDNS_gmysql_user=pdns
- PDNS_gmysql_dbname=powerdnsadmin
- PDNS_gmysql_password=H46beg4Bryhsf34g
- PDNS_primary=yes
- PDNS_api=yes
- PDNS_api_key=secret
- PDNSCONF_API_KEY=secret
- PDNS_webserver=yes
- PDNS_webserver-allow-from=127.0.0.1,10.0.0.0/8,172.0.0.0/8,192.168.10.0/24
- PDNS_webserver_address=0.0.0.0
- PDNS_webserver_password=VEs546EyM_mj8rtu
- PDNS_version_string=anonymous
- PDNS_default_ttl=1500
- PDNS_allow_notify_from=0.0.0.0
- PDNS_allow_axfr_ips=192.168.10.18
# - PDNS_default_soa_content=ns1.example.net hostmaster.@ 0 10800 3600 604800 3600
web_app:
image: powerdnsadmin/pda-legacy:0.4.2
container_name: pdns-web
restart: always
networks:
macvlan_network:
ipv4_address: 192.168.10.19
# ports:
# - 127.0.0.1:8080:80
depends_on:
- db
links:
- db:mysql
- pdns:pdns
environment:
- TZ=Asia/Shanghai
# - CSRF_COOKIE_SECURE=false
# - SESSION_COOKIE_SECURE=false
- LOG_LEVEL=DEBUG
- SQLALCHEMY_DATABASE_URI=mysql://pdns:[email protected]/powerdnsadmin
# 如下命令生成 key
# sudo docker exec pdns-web python -c 'import secrets; print(secrets.token_hex())'
- SECRET_KEY=885efe3bada4f874cf43320f04877d357de4d6ae7fe6104a22a88245dbc4d0c8
networks:
macvlan_network:
external: true