Skip to content

Commit 0c87b09

Browse files
authored
fix: ServerIP env variable deprecated, and other docker-compose.yaml updates (#109)
* updates to docker-compose.yaml and readme * fixed typos * final readme updates * typo * readme order Co-authored-by: SSinSD <[email protected]>
1 parent 5969c76 commit 0c87b09

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

one-container/README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@
22

33
## Description
44

5-
This Docker deployment runs both Pi-Hole and Unbound in a single container.
5+
This Docker deployment runs both Pi-Hole and Unbound in a single container.
66

77
The base image for the container is the [official Pi-Hole container](https://hub.docker.com/r/pihole/pihole), with an extra build step added to install the Unbound resolver directly into to the container based on [instructions provided directly by the Pi-Hole team](https://docs.pi-hole.net/guides/unbound/).
88

99
## Usage
1010

11-
First create a `.env` file to substitute variables for your deployment.
11+
First create a `.env` file to substitute variables for your deployment.
1212

13+
### Pi-hole environment variables
1314

14-
### Required environment variables
15+
> Vars and descriptions replicated from the [official pihole container](https://github.com/pi-hole/docker-pi-hole/#environment-variables):
1516
16-
> Vars and descriptions replicated from the [official pihole container](https://github.com/pi-hole/docker-pi-hole/):
17-
18-
| Docker Environment Var | Description|
19-
| --- | --- |
20-
| `ServerIP: <Host's IP>`<br/> | **--net=host mode requires** Set to your server's LAN IP, used by web block modes and lighttpd bind address
21-
| `TZ: <Timezone>`<br/> | Set your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to make sure logs rotate at local midnight instead of at UTC midnight.
22-
| `WEBPASSWORD: <Admin password>`<br/> | http://pi.hole/admin password. Run `docker logs pihole \| grep random` to find your random pass.
23-
| `REV_SERVER: <"true"\|"false">`<br/> | Enable DNS conditional forwarding for device name resolution
24-
| `REV_SERVER_DOMAIN: <Network Domain>`<br/> | If conditional forwarding is enabled, set the domain of the local network router
25-
| `REV_SERVER_TARGET: <Router's IP>`<br/> | If conditional forwarding is enabled, set the IP of the local network router
26-
| `REV_SERVER_CIDR: <Reverse DNS>`<br/>| If conditional forwarding is enabled, set the reverse DNS zone (e.g. `192.168.0.0/24`)
17+
| Variable | Default | Value | Description |
18+
| -------- | ------- | ----- | ---------- |
19+
| `TZ` | UTC | `<Timezone>` | Set your [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to make sure logs rotate at local midnight instead of at UTC midnight.
20+
| `WEBPASSWORD` | random | `<Admin password>` | http://pi.hole/admin password. Run `docker logs pihole \| grep random` to find your random pass.
21+
| `FTLCONF_REPLY_ADDR4` | unset | `<Host's IP>` | Set to your server's LAN IP, used by web block modes and lighttpd bind address.
22+
| `REV_SERVER` | `false` | `<"true"\|"false">` | Enable DNS conditional forwarding for device name resolution |
23+
| `REV_SERVER_DOMAIN` | unset | Network Domain | If conditional forwarding is enabled, set the domain of the local network router |
24+
| `REV_SERVER_TARGET` | unset | Router's IP | If conditional forwarding is enabled, set the IP of the local network router |
25+
| `REV_SERVER_CIDR` | unset | Reverse DNS | If conditional forwarding is enabled, set the reverse DNS zone (e.g. `192.168.0.0/24`) |
26+
| `WEBTHEME` | `default-light` | `<"default-dark"\|"default-darker"\|"default-light"\|"default-auto"\|"lcars">`| User interface theme to use.
2727

2828
Example `.env` file in the same directory as your `docker-compose.yaml` file:
2929

3030
```
31-
ServerIP=192.168.1.10
31+
FTLCONF_REPLY_ADDR4=192.168.1.10
3232
TZ=America/Los_Angeles
3333
WEBPASSWORD=QWERTY123456asdfASDF
3434
REV_SERVER=true
@@ -37,6 +37,8 @@ REV_SERVER_TARGET=192.168.1.1
3737
REV_SERVER_CIDR=192.168.0.0/16
3838
HOSTNAME=pihole
3939
DOMAIN_NAME=pihole.local
40+
PIHOLE_WEBPORT=80
41+
WEBTHEME=default-light
4042
```
4143

4244
### Using Portainer stacks?

one-container/docker-compose.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,22 @@ services:
1414
- 443:443/tcp
1515
- 53:53/tcp
1616
- 53:53/udp
17-
- 80:80/tcp
17+
- ${PIHOLE_WEBPORT}:80/tcp #Allows use of different port to access pihole web interface when other docker containers use port 80
1818
# - 5335:5335/tcp # Uncomment to enable unbound access on local server
1919
# - 22/tcp # Uncomment to enable SSH
2020
environment:
21-
- ServerIP=${ServerIP}
21+
- FTLCONF_REPLY_ADDR4=${FTLCONF_REPLY_ADDR4}
2222
- TZ=${TZ}
2323
- WEBPASSWORD=${WEBPASSWORD}
24+
- WEBTHEME=${WEBTHEME}
2425
- REV_SERVER=${REV_SERVER}
2526
- REV_SERVER_TARGET=${REV_SERVER_TARGET}
2627
- REV_SERVER_DOMAIN=${REV_SERVER_DOMAIN}
2728
- REV_SERVER_CIDR=${REV_SERVER_CIDR}
2829
- PIHOLE_DNS_=127.0.0.1#5335
2930
- DNSSEC="true"
31+
- DNSMASQ_LISTENING=single
3032
volumes:
3133
- etc_pihole-unbound:/etc/pihole:rw
3234
- etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw
3335
restart: unless-stopped
34-

two-container/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616
- 80/tcp
1717
- 22/tcp
1818
environment:
19-
- ServerIP=192.168.1.5
19+
- FTLCONF_REPLY_ADDR4=192.168.1.5
2020
- WEBPASSWORD=${WEBPASSWORD}
2121
- PIHOLE_DNS_192.168.1.6;192.168.1.13
2222
volumes:

0 commit comments

Comments
 (0)