add ACME_AGREE env variable to override sample and remove requirement for changing local path

This commit is contained in:
Philipp Böhm 2019-08-29 08:46:04 +02:00
parent 9d1d6cccdd
commit 13dae077d9
3 changed files with 5 additions and 13 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@
/docker/docker-compose.*.yml
/ddns
dump.rdb
/docker/.caddy_mount/
/docker/.redis_mount/

View File

@ -52,15 +52,6 @@ you have to create the following two DNS records:
### `ddns`-Setup
Setting up `ddns` was kind of a hassle in the legacy version, because there are multiple components that have to
work together:
* `ddns` that runs the frontend and provides an API compatible with the
[Remote Backend](https://doc.powerdns.com/md/authoritative/backend-remote/)
* Redis as storage backend for `ddns`
* PowerDNS as DNS server, which uses the `ddns` backend API on Port `8053`
* A web server that makes the `ddns` frontend accessible to the Internet through HTTPS
The setup is now automated using [docker-compose](https://docs.docker.com/compose/) and only some customization has
to be made in a `docker-compose.override.yml` file
(a [sample](./docker/docker-compose.override.yml.sample) is available here).
@ -81,8 +72,6 @@ Please adjust the settings in `docker-compose.override.yml` marked with the `#<<
* adjust the domain part in lines marked with `# <<< ADJUST DOMAIN` according to your DNS-Setup
* insert your email address in lines marked with `# <<< INSERT EMAIL` which is required for getting certificates
from Lets Encrypt
* adjust the path component before the `:` in lines marked with `# <<< ADJUST LOCAL PATH` if the shown path
does not meet your requirements
Finally execute the following `docker-compose` command, which creates 4 containers in detached mode which are also
started automatically after reboot. For updating an existing installation use the same command because it automatically

View File

@ -12,7 +12,7 @@ services:
redis:
volumes:
- "/root/ddns-redis:/data" # <<< ADJUST LOCAL PATH
- "${PWD}/.redis_mount:/data"
caddy:
restart: unless-stopped
@ -20,12 +20,13 @@ services:
depends_on:
- ddns
environment:
ACME_AGREE: "true"
DDNS_FRONTEND_HOST: ddns:8080
DDNS_CADDY_DOMAIN: ddns.example.net # <<< ADJUST DOMAIN
DDNS_CADDY_TLS_EMAIL: changeme@example.net # <<< INSERT EMAIL
volumes:
- "${PWD}/caddy/Caddyfile:/etc/Caddyfile"
- "/root/ddns-caddy:/root/.caddy" # <<< ADJUST LOCAL PATH
- "${PWD}/.caddy_mount:/root/.caddy"
ports:
- "80:80"
- "443:443"