template.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ---
  2. kind: compose
  3. schema: "1.1"
  4. metadata:
  5. name: Pihole
  6. description: >
  7. Network-wide advertisement and internet tracker blocking application that functions as a DNS sinkhole.
  8. Provides DNS-level content filtering for all network devices, improving browsing performance, privacy, and security.
  9. Supports custom blocklists, whitelists, and seamless integration with existing network infrastructure.
  10. Project: https://pi-hole.net/
  11. Documentation: https://docs.pi-hole.net/
  12. GitHub: https://github.com/pi-hole/pi-hole
  13. version: 2025.08.0
  14. author: Christian Lempa
  15. date: '2025-09-28'
  16. tags:
  17. - dns
  18. - ad-blocking
  19. draft: false
  20. next_steps: |
  21. 1. Start: docker compose up -d
  22. 2. Access web interface:
  23. {% if network_enabled and network_mode == 'macvlan' -%}
  24. http://{{ network_macvlan_ipv4_address }}
  25. {% elif traefik_enabled -%}
  26. {% if traefik_tls_enabled %}https{% else %}http{% endif %}://{{ traefik_host }}
  27. {%- elif ports_enabled -%}
  28. http://localhost:{{ ports_http }}
  29. {%- endif %}
  30. 3. Login password: {{ pihole_webpassword }}
  31. {% if network_enabled and network_mode == 'macvlan' -%}
  32. 4. Configure devices to use {{ network_macvlan_ipv4_address }} as DNS server
  33. {% if dhcp_enabled %}Configure DHCP in Settings > DHCP{% endif %}
  34. {%- elif ports_enabled and dns_enabled -%}
  35. 4. Configure devices to use Docker host IP as DNS server (port 53)
  36. {% if dhcp_enabled %}Configure DHCP in Settings > DHCP (port 67){% endif %}
  37. {%- endif %}
  38. spec:
  39. pihole:
  40. required: true
  41. vars:
  42. pihole_webpassword:
  43. description: "Web interface admin password"
  44. type: str
  45. sensitive: true
  46. default: ""
  47. autogenerated: true
  48. pihole_dns_upstreams:
  49. description: "Upstream DNS servers (semicolon separated)"
  50. type: str
  51. default: "1.1.1.1;1.0.0.1"
  52. dns_enabled:
  53. type: bool
  54. description: "Enable DNS server functionality"
  55. default: false
  56. dhcp_enabled:
  57. type: bool
  58. description: "Enable DHCP server functionality"
  59. default: false
  60. traefik:
  61. vars:
  62. traefik_host:
  63. default: "pihole.home.arpa"
  64. network:
  65. vars:
  66. network_enabled:
  67. default: true
  68. network_name:
  69. default: "pihole_network"
  70. ports:
  71. vars:
  72. ports_http:
  73. type: int
  74. default: 8080
  75. ports_https:
  76. type: int
  77. default: 8443