Skip to content

Commit

Permalink
Moved dnsmasq configuration into docker-compose file allowing for cus…
Browse files Browse the repository at this point in the history
…tomization; resolves #214
  • Loading branch information
davidalger committed Oct 11, 2020
1 parent f6f5a7c commit 514e674
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

**Enhancements:**

* Added ability to provide persistent additional configuration to `dnsmasq` service (issue [#214](https://github.com/davidalger/warden/issues/214))
* Added ability to easily specify alternate nameservers for `dnsmasq` to use (issue [#214](https://github.com/davidalger/warden/issues/214))
* Updated version of Portainer from 1.24.X to 2.0.X ([#245](https://github.com/davidalger/warden/pull/245) by @ragfire)

## Version [0.9.1](https://github.com/davidalger/warden/tree/0.9.1) (2020-08-25)
Expand Down
1 change: 0 additions & 1 deletion commands/svc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ if [[ "${WARDEN_PARAMS[0]}" == "up" ]]; then
## copy configuration files into location where they'll be mounted into containers from
mkdir -p "${WARDEN_HOME_DIR}/etc/traefik"
cp "${WARDEN_DIR}/config/traefik/traefik.yml" "${WARDEN_HOME_DIR}/etc/traefik/traefik.yml"
cp "${WARDEN_DIR}/config/dnsmasq.conf" "${WARDEN_HOME_DIR}/etc/dnsmasq.conf"

## generate dynamic traefik ssl termination configuration
cat > "${WARDEN_HOME_DIR}/etc/traefik/dynamic.yml" <<-EOT
Expand Down
16 changes: 0 additions & 16 deletions config/dnsmasq.conf

This file was deleted.

26 changes: 24 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,30 @@ services:
image: jpillora/dnsmasq
ports:
- "127.0.0.1:53:53/udp"
volumes:
- ${WARDEN_HOME_DIR}/etc/dnsmasq.conf:/etc/dnsmasq.conf
environment:
WARDEN_DNSMASQ_CONF: |-
#dnsmasq config, for a complete example, see:
# http://oss.segetech.com/intra/srv/dnsmasq.conf
#log all dns queries (enable as-needed for debugging purposes)
# log-queries
#dont use hosts nameservers
no-resolv
#use cloudflare as default nameservers, prefer 1^4
server=${WARDEN_DNSMASQ_NS1:-1.0.0.1}
server=${WARDEN_DNSMASQ_NS2:-1.1.1.1}
strict-order
#explicitly define host-ip mappings
address=/.test/127.0.0.1
${WARDEN_DNSMASQ_CONF_ADDITIONAL:-}
entrypoint: ["/bin/sh", "-c", "
echo \"$$WARDEN_DNSMASQ_CONF\" > /etc/dnsmasq.conf;
webproc --config /etc/dnsmasq.conf -- dnsmasq --no-daemon;
"]
labels:
- traefik.enable=true
- traefik.http.routers.dnsmasq.tls=true
Expand Down

0 comments on commit 514e674

Please sign in to comment.