From 13dae077d905526ba6db274025db779a1831edc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20B=C3=B6hm?= <“philipp@pboehm.org”> Date: Thu, 29 Aug 2019 08:46:04 +0200 Subject: [PATCH] add ACME_AGREE env variable to override sample and remove requirement for changing local path --- .gitignore | 2 ++ README.md | 11 ----------- docker/docker-compose.override.yml.sample | 5 +++-- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 5ef7cc6..d055efc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /docker/docker-compose.*.yml /ddns dump.rdb +/docker/.caddy_mount/ +/docker/.redis_mount/ diff --git a/README.md b/README.md index 10ebf00..f1651ae 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docker/docker-compose.override.yml.sample b/docker/docker-compose.override.yml.sample index f55ac9e..69a6519 100644 --- a/docker/docker-compose.override.yml.sample +++ b/docker/docker-compose.override.yml.sample @@ -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"