mirror of
https://github.com/skoelle/dyndns-updater.git
synced 2026-09-17 16:10:25 +00:00
state in container so new container always force push
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
.env
|
||||
data/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.venv/
|
||||
|
||||
@@ -13,7 +13,7 @@ Kontext: [`SPEC.md`](SPEC.md) (Design), [`PLAN.md`](PLAN.md) (Tasks),
|
||||
|
||||
- `app/` – Kernmodule (Python 3.12)
|
||||
- `config.py` – ENV-basierte Konfiguration + Validierung
|
||||
- `state.py` – persistierte letzte IP (`/data/last-known-ip.json`)
|
||||
- `state.py` – persistierte letzte IP (`/app/data/last-known-ip.json`, ephemeral im Container)
|
||||
- `fritzbox.py` – IP-Ermittlung via TR-064 (Retry/Backoff)
|
||||
- `cloudflare.py` – A-Record-Update (DNS-only)
|
||||
- `freedns.py` – FreeDNS-Update-Call
|
||||
@@ -31,7 +31,7 @@ Kontext: [`SPEC.md`](SPEC.md) (Design), [`PLAN.md`](PLAN.md) (Tasks),
|
||||
|
||||
## Konventionen
|
||||
|
||||
- CREDENTIALS NIE committen. `.env` und `data/` sind gitignored – nie mit `-f` hinzufügen.
|
||||
- CREDENTIALS NIE committen. `.env` ist gitignored – nie mit `-f` hinzufügen.
|
||||
- Keine Co-Autoren in Commits.
|
||||
- Keine Kommentare im Code außer auf Nachfrage.
|
||||
- Python-Code mit Ruff formatieren (line-length 100, double quotes).
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app/ ./app/
|
||||
|
||||
RUN mkdir -p /data && chown -R appuser:appuser /app /data
|
||||
RUN mkdir -p /app/data && chown -R appuser:appuser /app
|
||||
|
||||
USER appuser
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ class Config:
|
||||
|
||||
self.healthcheck_ping_url = os.environ.get("HEALTHCHECK_PING_URL", "")
|
||||
|
||||
self.state_path = os.environ.get("STATE_PATH", "/data/last-known-ip.json")
|
||||
self.state_path = os.environ.get("STATE_PATH", "/app/data/last-known-ip.json")
|
||||
|
||||
def validate(self):
|
||||
missing = [v for v in REQUIRED_VARS if not os.environ.get(v)]
|
||||
|
||||
@@ -7,7 +7,5 @@ services:
|
||||
- .env
|
||||
ports:
|
||||
- "8090:8090" # Webhook-Port (GET, kein Auth) - intern im LAN
|
||||
volumes:
|
||||
- ./data:/data # last-known-ip.json Persistierung
|
||||
labels:
|
||||
- "com.centurylinklabs.watchtower.enable=true"
|
||||
|
||||
Reference in New Issue
Block a user