Skip to content

Commit 0bfe2cd

Browse files
authored
Merge pull request #3 from noadc-dev/add-docker-secrets-support
Add docker secrets support
2 parents f47aa19 + 5a93536 commit 0bfe2cd

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

README.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ services:
114114
container_name: porkbun-ddns
115115
environment:
116116
DOMAIN: "domain.com" # Your Porkbun domain
117-
SUBDOMAINS: "my_subdomain,my_other_subdomain,my_subsubdomain.my_subdomain" # Comma-separated subdomains
118-
SECRETAPIKEY: "<YOUR-SECRETAPIKEY>" # Pass your Porkbun Secret API Key in plaintext
119-
APIKEY: "<YOUR-APIKEY>" # Pass your Porkbun API Key in plaintext
117+
SUBDOMAINS: "my_subdomain,my_other_subdomain,my_subsubdomain.my_subdomain"
118+
SECRETAPIKEY: "<YOUR-SECRETAPIKEY>"
119+
APIKEY: "<YOUR-APIKEY>"
120120
# PUBLIC_IPS: "1.2.3.4,2001:043e::1" # Set if you have static IPs
121121
# FRITZBOX: "192.168.178.1" # Use Fritz!BOX to obtain public IPs
122122
# SLEEP: "300" # Seconds to sleep between DynDNS runs
@@ -134,20 +134,27 @@ services:
134134
image: "mietzen/porkbun-ddns:latest"
135135
container_name: porkbun-ddns
136136
environment:
137-
DOMAIN: "domain.com"
137+
DOMAIN: "domain.com" # Your Porkbun domain
138138
SUBDOMAINS: "my_subdomain,my_other_subdomain,my_subsubdomain.my_subdomain"
139-
APIKEY_FILE: "/run/secrets/PORKBUN_API_KEY" # Read API key from Docker secret
140-
SECRETAPIKEY_FILE: "/run/secrets/PORKBUN_SECRET_API_KEY" # Read secret API key from Docker secret
139+
APIKEY_FILE: "/run/secrets/PORKBUN_API_KEY"
140+
SECRETAPIKEY_FILE: "/run/secrets/PORKBUN_SECRET_API_KEY"
141+
# PUBLIC_IPS: "1.2.3.4,2001:043e::1" # Set if you have static IPs
142+
# FRITZBOX: "192.168.178.1" # Use Fritz!BOX to obtain public IPs
143+
# SLEEP: "300" # Seconds to sleep between DynDNS runs
144+
# IPV4: "TRUE" # Enable IPv4
145+
# IPV6: "TRUE" # Enable IPv6
146+
# DEBUG: "FALSE" # Enable debug logging
141147
restart: unless-stopped
142148
secrets:
143149
- PORKBUN_API_KEY
144150
- PORKBUN_SECRET_API_KEY
145151

146152
secrets:
153+
# Replace `/path/to/secrets/` with the actual directory where your secrets are stored.
147154
PORKBUN_API_KEY:
148-
file: /path/to/secrets/PORKBUN_API_KEY # Replace with actual directory
155+
file: /path/to/secrets/PORKBUN_API_KEY
149156
PORKBUN_SECRET_API_KEY:
150-
file: /path/to/secrets/PORKBUN_SECRET_API_KEY # Replace with actual directory
157+
file: /path/to/secrets/PORKBUN_SECRET_API_KEY
151158
```
152159
153160
---
@@ -173,22 +180,11 @@ docker run -d \
173180
-e SUBDOMAINS="my_subdomain,my_other_subdomain" \
174181
-e APIKEY_FILE="/run/secrets/PORKBUN_API_KEY" \
175182
-e SECRETAPIKEY_FILE="/run/secrets/PORKBUN_SECRET_API_KEY" \
183+
# Mount the secret files so they can be accessed by the container
184+
# Replace `/path/to/secrets/` with the actual directory where your secrets are stored.
176185
--mount type=bind,source=/path/to/secrets/PORKBUN_API_KEY,target=/run/secrets/PORKBUN_API_KEY,readonly \
177186
--mount type=bind,source=/path/to/secrets/PORKBUN_SECRET_API_KEY,target=/run/secrets/PORKBUN_SECRET_API_KEY,readonly \
178187
--name porkbun-ddns \
179188
--restart unless-stopped \
180189
noadc-dev/porkbun-ddns:latest
181190
```
182-
183-
---
184-
185-
### Key Improvements:
186-
187-
1. **Grammar and Clarity:** Improved sentence structure for better readability.
188-
2. **Consistency:**
189-
- Standardized punctuation and formatting.
190-
- Ensured all references to variables, commands, and services were uniform.
191-
3. **Code Formatting:** Ensured proper indentation in YAML files for readability.
192-
4. **Spelling Fixes:** Fixed minor typos and inconsistencies.
193-
194-
Your README is now clearer, more professional, and easier to follow. 🚀 Let me know if you need any additional tweaks!

0 commit comments

Comments
 (0)