feat: add Docker image, Helm chart and Gitea CI
- multi-stage Dockerfile with ffmpeg on Alpine JRE 21 - Helm chart for k3s: library ConfigMap, Vault users secret, data PVC, read-only hostPath media, ingress, probes and security context - Gitea Actions runs tests, smoke test and chart lint, then builds and pushes the image on main and version tags
This commit is contained in:
1 parent
18a1d7cd19
commit
25331ec0e1
12 files changed
+494
-11
No files matched your search
@@ -632,21 +632,49 @@ Cover extraction order: embedded APIC frame -> `cover.jpg`/`folder.jpg`/`front.j
|
||||
- Image: `gitea.tap-tap.win/tap-tap/audiomanager:<tag>` (registry paths must be lowercase).
|
||||
- Gitea Actions builds and pushes on tags; `imagePullSecret` is provided by the cluster.
|
||||
|
||||
Build the image locally:
|
||||
|
||||
```bash
|
||||
docker build -t gitea.tap-tap.win/tap-tap/audiomanager:dev .
|
||||
```
|
||||
|
||||
`.gitea/workflows/ci.yaml` runs tests and the smoke script, then builds and pushes
|
||||
`:latest` for `main` and the tag name for `v*` tags. Set `REGISTRY_USERNAME` /
|
||||
`REGISTRY_PASSWORD` repository secrets if the automatically provided token cannot
|
||||
push to the registry.
|
||||
|
||||
### 9.2 Helm chart
|
||||
|
||||
`charts/musicmanager` with values for:
|
||||
`charts/musicmanager` renders:
|
||||
|
||||
- image repository/tag, `imagePullSecrets`
|
||||
- `library` config (folders) rendered into a ConfigMap
|
||||
- image repository/tag and `imagePullSecrets`
|
||||
- `library.folders` into a ConfigMap (`/etc/musicmanager/library.yaml`)
|
||||
- `users.existingSecret` + key (Vault-managed; never put passwords in values)
|
||||
- ingress host `subsonic.tap-tap.win`, ingress class, TLS via cluster issuer
|
||||
- ingress host `subsonic.tap-tap.win`, ingress class and TLS secret
|
||||
- `/data` PVC (size, storage class)
|
||||
- `hostPath` mounts: `/mnt/media/music` and `/mnt/media/longform`, read-only
|
||||
- no node pinning: every schedulable node must expose the same mounts (documented)
|
||||
- resource requests/limits, security context, liveness/readiness probes (`/health`)
|
||||
- optional `nodeSelector`/`tolerations` for future use
|
||||
- `hostPath` mounts for music and long-form roots, both read-only
|
||||
- resource requests/limits, non-root security context, probes on `/health`
|
||||
- optional `nodeSelector`, `tolerations` and `affinity`
|
||||
|
||||
The server fails its readiness probe if a configured root path is missing or unreadable.
|
||||
The secret is not created by the chart. Create it from the Vault-managed file:
|
||||
|
||||
```bash
|
||||
kubectl create namespace musicmanager
|
||||
kubectl -n musicmanager create secret generic musicmanager-users \
|
||||
--from-file=users.yaml=config/users.yaml
|
||||
|
||||
helm upgrade --install musicmanager charts/musicmanager \
|
||||
--namespace musicmanager \
|
||||
--set image.tag=dev \
|
||||
--set users.existingSecret=musicmanager-users
|
||||
```
|
||||
|
||||
Adjust `library.folders`, `media.music.hostPath` and `media.longform.hostPath` for
|
||||
the cluster. Every schedulable node must expose the same host paths; the chart
|
||||
deliberately does not pin the pod to a node.
|
||||
|
||||
The server exits at startup if a configured root path is missing or unreadable, so
|
||||
the pod will not pass its readiness probe in that case.
|
||||
|
||||
### 9.3 Operations
|
||||
|
||||
@@ -696,8 +724,8 @@ Verify each step with `./gradlew test` and/or `curl`:
|
||||
- [x] 4. **Browsing & media:** system, browsing, genre and media routes (`stream`, `download`, `getCoverArt`).
|
||||
- [x] 5. **Transcoding:** `FfmpegTranscoder.kt`, `maxBitRate`/`format`/`timeOffset`, extension declaration.
|
||||
- [x] 6. **Interaction & playlists:** `getAlbumList2`, `getRandomSongs`, `getStarred2`, `search3`, `scrobble`, `star`/`unstar`, `setRating`, bookmarks, playlists.
|
||||
- [ ] 7. **Packaging:** multi-stage Dockerfile (with ffmpeg), Helm chart, Gitea Actions workflow.
|
||||
- [ ] 8. **Tests:** integration suite as described above, plus a `curl` smoke script.
|
||||
- [x] 7. **Packaging:** multi-stage Dockerfile (with ffmpeg), Helm chart, Gitea Actions workflow.
|
||||
- [x] 8. **Tests:** integration suite as described above, plus a `curl` smoke script.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user