fix registry hostname and load .env automatically

gitea.thuis.local doesn't resolve on this network; the real internal
Gitea hostname is gitea.zb.local. Also load .env via python-dotenv so
the app works the same under PowerShell as bash, and add .dockerignore
so .env never ends up baked into the image.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
2026-07-25 09:29:43 +02:00
co-authored by Claude Sonnet 5
parent 60735de445
commit e805dc9194
5 changed files with 22 additions and 12 deletions
+6 -6
View File
@@ -47,23 +47,23 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }} .
run: docker build -t gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }} .
- name: Trivy scan
uses: aquasecurity/trivy-action@master
with:
image-ref: gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }}
image-ref: gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }}
severity: CRITICAL,HIGH
exit-code: "1" # laat de pipeline falen bij kritieke kwetsbaarheden
- name: Login bij Gitea-registry
run: echo "${{ secrets.GLUCOSE_TOKEN }}" | docker login gitea.thuis.local -u willem --password-stdin
run: echo "${{ secrets.GLUCOSE_TOKEN }}" | docker login gitea.zb.local -u willem --password-stdin
- name: Tag en push
run: |
docker tag gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }} gitea.thuis.local/willem/glucose-dashboard:latest
docker push gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }}
docker push gitea.thuis.local/willem/glucose-dashboard:latest
docker tag gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }} gitea.zb.local/willem/glucose-dashboard:latest
docker push gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }}
docker push gitea.zb.local/willem/glucose-dashboard:latest
# ---------------------------------------------------------------------
# 4. Deploy — SSH naar de LXC en herstart met de nieuwe image