feat(deploy): Dockerfile + Helm chart for k3s homelab deployment #89

Merged
arcodange merged 1 commits from vibe/batch22-dockerfile-helm-chart into main 2026-05-06 06:51:15 +02:00
Owner

Summary

First step of k3s homelab deployment for dance-lessons-coach.

Adds the deployment scaffolding so the binary can be deployed to the ARCODANGE k3s homelab — pattern adapted from arcodange-org/webapp.

What's in this PR

  • Dockerfile : multi-stage Go alpine build (golang:1.26-alpine builder → alpine:latest runtime), runs swag init then go build ./cmd/server, exposes 8080
  • chart/ : minimal Helm chart with deployment, service, ingress, serviceaccount, configmap, helpers, NOTES
  • Ingress : dancecoachlessons.arcodange.lab via Traefik with crowdsec middleware
  • NodeSelector : pi1 (mirrors webapp pattern)
  • healthz : /api/healthz for liveness + readiness
  • values.yaml config block** : exposes DLC_LOGGING_*, DLC_DATABASE_*, DLC_API_V2_ENABLED via configmap → envFrom

Degraded mode

This first PR ships a "degraded mode" deployment :

  • No database wiring (DB host empty in values)
  • No SMTP (magic-link emails won't work yet)
  • No Vault integration (no dynamic postgres creds, no kvv2 secrets)

Just serves the binary + swagger + healthz endpoints — enough to make https://dancecoachlessons.arcodange.lab/swagger/doc.json referenceable.

Verification

helm lint chart/                     # ✓ 1 chart(s) linted, 0 chart(s) failed
helm template chart/ --set image.repository=test --set image.tag=v1
                                     # ✓ produces ServiceAccount + ConfigMap + Service + Deployment + Ingress

Follow-ups (separate PRs)

  • Vault auth (VaultAuth + VaultStaticSecret + VaultDynamicSecret CRDs for SMTP creds + dynamic postgres)
  • Terraform iac/ for Vault config (kvv2 path + postgres role)
  • Gitea workflow for docker build + push to gitea.arcodange.lab/arcodange/dance-lessons-coach
  • Gitea workflow for tofu apply on iac/

Notes

  • Chart name : dance-lessons-coach (kebab-case, Helm convention)
  • ConfigMap chosen over config.yaml template name to avoid confusion with viper config
  • ASCII-safe everywhere except YAML literals
## Summary First step of k3s homelab deployment for dance-lessons-coach. Adds the deployment scaffolding so the binary can be deployed to the ARCODANGE k3s homelab — pattern adapted from `arcodange-org/webapp`. ## What's in this PR - **Dockerfile** : multi-stage Go alpine build (golang:1.26-alpine builder → alpine:latest runtime), runs `swag init` then `go build ./cmd/server`, exposes 8080 - **chart/** : minimal Helm chart with deployment, service, ingress, serviceaccount, configmap, helpers, NOTES - **Ingress** : `dancecoachlessons.arcodange.lab` via Traefik with crowdsec middleware - **NodeSelector** : `pi1` (mirrors webapp pattern) - **healthz** : `/api/healthz` for liveness + readiness - **values.yaml** config block** : exposes `DLC_LOGGING_*`, `DLC_DATABASE_*`, `DLC_API_V2_ENABLED` via configmap → envFrom ## Degraded mode This first PR ships a "degraded mode" deployment : - ❌ No database wiring (DB host empty in values) - ❌ No SMTP (magic-link emails won't work yet) - ❌ No Vault integration (no dynamic postgres creds, no kvv2 secrets) Just serves the binary + swagger + healthz endpoints — enough to make `https://dancecoachlessons.arcodange.lab/swagger/doc.json` referenceable. ## Verification ``` helm lint chart/ # ✓ 1 chart(s) linted, 0 chart(s) failed helm template chart/ --set image.repository=test --set image.tag=v1 # ✓ produces ServiceAccount + ConfigMap + Service + Deployment + Ingress ``` ## Follow-ups (separate PRs) - Vault auth (VaultAuth + VaultStaticSecret + VaultDynamicSecret CRDs for SMTP creds + dynamic postgres) - Terraform `iac/` for Vault config (kvv2 path + postgres role) - Gitea workflow for `docker build` + push to `gitea.arcodange.lab/arcodange/dance-lessons-coach` - Gitea workflow for `tofu apply` on iac/ ## Notes - Chart name : `dance-lessons-coach` (kebab-case, Helm convention) - ConfigMap chosen over `config.yaml` template name to avoid confusion with viper config - ASCII-safe everywhere except YAML literals
arcodange added 1 commit 2026-05-06 06:51:08 +02:00
Pattern adapted from arcodange-org/webapp.

Degraded mode : no DB / no SMTP / no Vault yet, just serves the binary +
swagger + healthz. Subsequent PRs will add Vault auth + Postgres dynamic
credentials + SMTP config.

Ingress route : dancecoachlessons.arcodange.lab (homelab internal).
arcodange merged commit f74ba51d7a into main 2026-05-06 06:51:15 +02:00
arcodange deleted branch vibe/batch22-dockerfile-helm-chart 2026-05-06 06:51:15 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arcodange/dance-lessons-coach#89