Skip to content

Commit a7565e2

Browse files
committed
Default upstream DNS to Google and remove the mention of the environment variable from the quickstart compose file.
Signed-off-by: Adam Warner <[email protected]>
1 parent c9a7c58 commit a7565e2

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ services:
4747
# Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
4848
TZ: 'Europe/London'
4949
# Set a password to access the web interface. Not setting one will result in a random password being assigned
50-
FTLCONF_webserver_api_password: 'correct horse battery staple'
51-
# Configure DNS upstream servers, e.g:
52-
FTLCONF_dns_upstreams: '8.8.8.8;8.8.4.4'
50+
FTLCONF_webserver_api_password: 'correct horse battery staple'
5351
# Volumes store your data between container upgrades
5452
volumes:
5553
# For persisting Pi-hole's databases and common configuration file

examples/docker-compose-caddy-proxy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ services:
3535
# Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g:
3636
TZ: 'Europe/London'
3737
# Set a password to access the web interface. Not setting one will result in a random password being assigned
38-
FTLCONF_webserver_api_password: 'correct horse battery staple'
39-
# Configure DNS upstream servers, e.g:
40-
FTLCONF_dns_upstreams: '8.8.8.8;8.8.4.4'
38+
FTLCONF_webserver_api_password: 'correct horse battery staple'
4139
# Volumes store your data between container upgrades
4240
volumes:
4341
# For persisting Pi-hole's databases and common configuration file

src/bash_functions.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,9 @@ ensure_basic_configuration() {
6262
fi
6363

6464
# If getFTLConfigValue "dns.upstreams" returns [], exit the container. We need upstream servers to function!
65-
if [[ $(getFTLConfigValue "dns.upstreams") == "[]" ]]; then
66-
echo ""
67-
echo " [X] No DNS upstream servers are set!"
68-
echo " [i] Recommended: Set the upstream DNS servers in the environment variable FTLCONF_dns_upstreams"
69-
echo ""
70-
exit 1
65+
if [[ $(getFTLConfigValue "dns.upstreams") == "[]" ]]; then
66+
echo " [i] No DNS upstream set in environment or config file, defaulting to Google DNS"
67+
setFTLConfigValue "dns.upstreams" "[\"8.8.8.8\", \"8.8.4.4\"]"
7168
fi
7269

7370
setup_web_password

0 commit comments

Comments
 (0)