| 
									
										
										
										
											2022-07-28 17:46:12 +00:00
										 |  |  | version: "3.7"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | services:
 | 
					
						
							|  |  |  |   pihole:
 | 
					
						
							|  |  |  |     container_name: pihole
 | 
					
						
							| 
									
										
										
										
											2024-02-14 23:07:40 +00:00
										 |  |  |     image: pihole/pihole:2024.02.0
 | 
					
						
							| 
									
										
										
										
											2022-07-28 17:46:12 +00:00
										 |  |  |     restart: unless-stopped
 | 
					
						
							|  |  |  |     hostname: pihole
 | 
					
						
							|  |  |  |     dns:
 | 
					
						
							|  |  |  |       - 127.0.0.1
 | 
					
						
							|  |  |  |     ports:
 | 
					
						
							| 
									
										
										
										
											2022-09-23 13:13:04 +00:00
										 |  |  |       - ${NETWORK_INTERFACE:-0.0.0.0}:53:53/tcp
 | 
					
						
							|  |  |  |       - ${NETWORK_INTERFACE:-0.0.0.0}:53:53/udp
 | 
					
						
							| 
									
										
										
										
											2022-07-28 17:46:12 +00:00
										 |  |  |       - ${APP_PORT}:80
 | 
					
						
							|  |  |  |     volumes:
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/pihole:/etc/pihole
 | 
					
						
							|  |  |  |       - ${APP_DATA_DIR}/data/dnsmasq:/etc/dnsmasq.d
 | 
					
						
							|  |  |  |     environment:
 | 
					
						
							|  |  |  |       TZ: ${TZ}
 | 
					
						
							|  |  |  |       WEBPASSWORD: ${APP_PASSWORD}
 | 
					
						
							|  |  |  |     cap_add:
 | 
					
						
							|  |  |  |       - NET_ADMIN
 | 
					
						
							|  |  |  |     networks:
 | 
					
						
							| 
									
										
										
										
											2023-08-29 19:40:52 +00:00
										 |  |  |       - tipi_main_network
 | 
					
						
							| 
									
										
										
										
											2022-11-11 19:33:58 +00:00
										 |  |  |     labels:
 | 
					
						
							| 
									
										
										
										
											2023-06-18 16:02:29 +00:00
										 |  |  |       # Main
 | 
					
						
							|  |  |  |       traefik.enable: true
 | 
					
						
							|  |  |  |       traefik.http.middlewares.pihole-web-redirect.redirectscheme.scheme: https
 | 
					
						
							|  |  |  |       traefik.http.services.pihole.loadbalancer.server.port: 80
 | 
					
						
							|  |  |  |       # Web
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-insecure.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-insecure.service: pihole
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-insecure.middlewares: pihole-web-redirect
 | 
					
						
							|  |  |  |       # Websecure
 | 
					
						
							| 
									
										
										
										
											2022-11-11 19:33:58 +00:00
										 |  |  |       traefik.http.routers.pihole.rule: Host(`${APP_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole.service: pihole
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole.tls.certresolver: myresolver
 | 
					
						
							| 
									
										
										
										
											2023-06-18 16:02:29 +00:00
										 |  |  |       # Local domain
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local-insecure.rule: Host(`pihole.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local-insecure.entrypoints: web
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local-insecure.service: pihole
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local-insecure.middlewares: pihole-web-redirect
 | 
					
						
							|  |  |  |       # Local domain secure
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local.rule: Host(`pihole.${LOCAL_DOMAIN}`)
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local.entrypoints: websecure
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local.service: pihole
 | 
					
						
							|  |  |  |       traefik.http.routers.pihole-local.tls: true
 |