Bridge networking + new env vars (#36)
* Changing to bridge networking * Adding volume declarations * Updating readme with Portainer volumes note * Adding env var for HOSTNAME * Adding env var for DOMAIN_NAME
This commit is contained in:
parent
bff342a5d1
commit
2ee6ae4a17
2 changed files with 18 additions and 7 deletions
|
@ -37,6 +37,15 @@ REV_SERVER_TARGET=192.168.1.1
|
||||||
REV_SERVER_CIDR=192.168.0.0/16
|
REV_SERVER_CIDR=192.168.0.0/16
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Using Portainer stacks?
|
||||||
|
|
||||||
|
Portainer stacks are a little weird and don't want you to declare your named volumes, so remove this block from the top of the `docker-compose.yaml` file before copy/pasting into Portainer's stack editor:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
etc_pihole-unbound:
|
||||||
|
etc_pihole_dnsmasq-unbound:
|
||||||
|
```
|
||||||
|
|
||||||
### Running the stack
|
### Running the stack
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
version: '2'
|
version: '2'
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
etc_pihole-unbound:
|
||||||
|
etc_pihole_dnsmasq-unbound:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
pihole:
|
pihole:
|
||||||
container_name: pihole
|
container_name: pihole
|
||||||
image: cbcrowe/pihole-unbound:latest
|
image: cbcrowe/pihole-unbound:latest
|
||||||
hostname: pihole
|
hostname: ${HOSTNAME}
|
||||||
domainname: pihole.local
|
domainname: ${DOMAIN_NAME}
|
||||||
ports:
|
ports:
|
||||||
- 443/tcp
|
- 443:443/tcp
|
||||||
- 53/tcp
|
- 53:53/tcp
|
||||||
- 53/udp
|
- 53:53/udp
|
||||||
- 80/tcp
|
- 80:80/tcp
|
||||||
# - 22/tcp # Uncomment to enable SSH
|
# - 22/tcp # Uncomment to enable SSH
|
||||||
environment:
|
environment:
|
||||||
ServerIP: ${ServerIP}
|
ServerIP: ${ServerIP}
|
||||||
|
@ -24,7 +27,6 @@ services:
|
||||||
DNS1: 127.0.0.1#5335 # Hardcoded to our Unbound server
|
DNS1: 127.0.0.1#5335 # Hardcoded to our Unbound server
|
||||||
DNS2: 127.0.0.1#5335 # Hardcoded to our Unbound server
|
DNS2: 127.0.0.1#5335 # Hardcoded to our Unbound server
|
||||||
DNSSEC: "true" # Enable DNSSEC
|
DNSSEC: "true" # Enable DNSSEC
|
||||||
network_mode: "host"
|
|
||||||
volumes:
|
volumes:
|
||||||
- etc_pihole-unbound:/etc/pihole:rw
|
- etc_pihole-unbound:/etc/pihole:rw
|
||||||
- etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw
|
- etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw
|
||||||
|
|
Loading…
Reference in a new issue