From c13952f32f80069dec5f8afbb741ee272962afbd Mon Sep 17 00:00:00 2001 From: Elias Stepanik <40958815+eliasstepanik@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:00:56 +0100 Subject: [PATCH 1/5] Update docker-compose.yml --- docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 63812de..c348506 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,10 @@ version: "3.7" services: ionos_ddns_updater: - build: . + image: saile2204/ionos_ddns_updater:latest restart: unless-stopped tty: true stdin_open: true environment: - APIKey: "" - Domains_0: "*.test.de" + API_Key: "" + DOMAINS: "subdomain.domain.de,domain.de" From 1cb1cdb7e431227499eb87e0ed7769c1386be846 Mon Sep 17 00:00:00 2001 From: Elias Stepanik <40958815+eliasstepanik@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:03:29 +0100 Subject: [PATCH 2/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 03da293..95597c9 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ To use the IonosDynamicDNSUpdater, follow these steps: ### Using Docker Compose 1. Create an API token in Ionos. -2. Replace the placeholder values in `appsettings.json` with your Ionos API token and the hostname for the DNS record you want to update. +2. Replace the placeholder values in `docker-compose.yml` with your Ionos API token and the hostname for the DNS record you want to update. 3. Start the services using `docker-compose up -d`. ## Contributing From 2b6d6b61ea5f831087445655fc5e901708012c4f Mon Sep 17 00:00:00 2001 From: Elias Stepanik <40958815+eliasstepanik@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:11:13 +0100 Subject: [PATCH 3/5] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c348506..9ef41d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: "3.7" services: ionos_ddns_updater: - image: saile2204/ionos_ddns_updater:latest + build: . restart: unless-stopped tty: true stdin_open: true From 86cf3239bc7f89766b681fe3b5ae077a3aa427c5 Mon Sep 17 00:00:00 2001 From: Elias Stepanik <40958815+eliasstepanik@users.noreply.github.com> Date: Fri, 10 Feb 2023 10:36:46 +0100 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95597c9..a89610d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ To use the IonosDynamicDNSUpdater, follow these steps: ### Running in a Docker container 1. Build the Docker image using `docker build -t ionosdynamicdnsupdater .`. -2. Run the Docker container using `docker run -d ionosdynamicdnsupdater`. +2. Run the Docker container using `docker run -d -e API_KEY= -e DOMAINS= ionosdynamicdnsupdater`. ### Using Docker Compose From 9aefab3238b736d6d3dada622a04e096fc1bc557 Mon Sep 17 00:00:00 2001 From: Elias Stepanik <40958815+eliasstepanik@users.noreply.github.com> Date: Fri, 10 Feb 2023 17:54:30 +0100 Subject: [PATCH 5/5] Update DDNSService.cs --- DDNSUpdater/Services/DDNSService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DDNSUpdater/Services/DDNSService.cs b/DDNSUpdater/Services/DDNSService.cs index 4df6d24..4c1b713 100644 --- a/DDNSUpdater/Services/DDNSService.cs +++ b/DDNSUpdater/Services/DDNSService.cs @@ -21,12 +21,12 @@ public class DDNSService : IDDNSService { _logger = logger; APIKey = configuration.GetValue("APIKey"); - if(Environment.GetEnvironmentVariable("API_Key") != "") + if(Environment.GetEnvironmentVariable("API_Key") != "default") APIKey = Environment.GetEnvironmentVariable("API_Key"); logger.LogDebug($"Got the Following Key: {APIKey}"); Domains = configuration.GetSection("Domains").Get>(); - if (Environment.GetEnvironmentVariable("DOMAINS") != "") + if (Environment.GetEnvironmentVariable("DOMAINS") != "default") { var domainsRaw = Environment.GetEnvironmentVariable("DOMAINS"); var domains = new List(); @@ -99,4 +99,4 @@ public class DDNSService : IDDNSService return ""; } } -} \ No newline at end of file +}