state in container so new container always force push

This commit is contained in:
2026-08-07 11:35:10 +02:00
parent 1c89927b18
commit 5ac8ebb0fc
5 changed files with 4 additions and 7 deletions
-1
View File
@@ -1,5 +1,4 @@
.env .env
data/
__pycache__/ __pycache__/
*.pyc *.pyc
.venv/ .venv/
+2 -2
View File
@@ -13,7 +13,7 @@ Kontext: [`SPEC.md`](SPEC.md) (Design), [`PLAN.md`](PLAN.md) (Tasks),
- `app/` Kernmodule (Python 3.12) - `app/` Kernmodule (Python 3.12)
- `config.py` ENV-basierte Konfiguration + Validierung - `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) - `fritzbox.py` IP-Ermittlung via TR-064 (Retry/Backoff)
- `cloudflare.py` A-Record-Update (DNS-only) - `cloudflare.py` A-Record-Update (DNS-only)
- `freedns.py` FreeDNS-Update-Call - `freedns.py` FreeDNS-Update-Call
@@ -31,7 +31,7 @@ Kontext: [`SPEC.md`](SPEC.md) (Design), [`PLAN.md`](PLAN.md) (Tasks),
## Konventionen ## 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 Co-Autoren in Commits.
- Keine Kommentare im Code außer auf Nachfrage. - Keine Kommentare im Code außer auf Nachfrage.
- Python-Code mit Ruff formatieren (line-length 100, double quotes). - Python-Code mit Ruff formatieren (line-length 100, double quotes).
+1 -1
View File
@@ -9,7 +9,7 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY app/ ./app/ 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 USER appuser
+1 -1
View File
@@ -38,7 +38,7 @@ class Config:
self.healthcheck_ping_url = os.environ.get("HEALTHCHECK_PING_URL", "") 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): def validate(self):
missing = [v for v in REQUIRED_VARS if not os.environ.get(v)] missing = [v for v in REQUIRED_VARS if not os.environ.get(v)]
-2
View File
@@ -7,7 +7,5 @@ services:
- .env - .env
ports: ports:
- "8090:8090" # Webhook-Port (GET, kein Auth) - intern im LAN - "8090:8090" # Webhook-Port (GET, kein Auth) - intern im LAN
volumes:
- ./data:/data # last-known-ip.json Persistierung
labels: labels:
- "com.centurylinklabs.watchtower.enable=true" - "com.centurylinklabs.watchtower.enable=true"