From 04b9edf63719cf80bf512aac72e6e0b24646d122 Mon Sep 17 00:00:00 2001 From: Mika Bomm Date: Wed, 24 Jul 2024 19:29:17 +0200 Subject: [PATCH] update ddns-updater to exclude api key in config / added dozzle logging --- .gitignore | 7 +++++++ ddns-updater/.env.example | 2 ++ ddns-updater/compose.yaml | 5 +++++ ddns-updater/data/config.json | 21 +++++++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 ddns-updater/.env.example create mode 100755 ddns-updater/data/config.json diff --git a/.gitignore b/.gitignore index 1584e69..a58e470 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,10 @@ !**/compose.yml !**/Caddyfile !**/.env.example +!**/Dockerfile + + +#DDNS updater + +!**/data/config.json + diff --git a/ddns-updater/.env.example b/ddns-updater/.env.example new file mode 100644 index 0000000..b87aba4 --- /dev/null +++ b/ddns-updater/.env.example @@ -0,0 +1,2 @@ +PORKBUN_API_KEY= +PORKBUN_API_SECRET_KEY= diff --git a/ddns-updater/compose.yaml b/ddns-updater/compose.yaml index ae7bf7a..038eaa8 100644 --- a/ddns-updater/compose.yaml +++ b/ddns-updater/compose.yaml @@ -1,9 +1,14 @@ services: ddns-updater: + container_name: ddns-updater + user: "1001:1001" ports: - 55555:8000/tcp volumes: - /opt/stacks/ddns-updater/data:/updater/data image: qmcgaw/ddns-updater restart: unless-stopped + env_file: + - .env + networks: {} diff --git a/ddns-updater/data/config.json b/ddns-updater/data/config.json new file mode 100755 index 0000000..64c216b --- /dev/null +++ b/ddns-updater/data/config.json @@ -0,0 +1,21 @@ +{ + "settings": [ + { + "provider": "porkbun", + "domain": "mixel.cloud", + "host": "ddns", + "api_key": "${PORKBUN_API_KEY}", + "secret_api_key": "${PORKBUN_API_SECRET_KEY}", + "ip_version": "ipv4" + }, + { + "provider": "porkbun", + "domain": "mixel.cloud", + "host": "pdf2", + "api_key": "${PORKBUN_API_KEY}", + "secret_api_key": "${PORKBUN_API_SECRET_KEY}", + "ip_version": "ipv4" + } + + ] +}