refactor(docker): default compose builds from Dockerfiles (baked deps, cached)

Chosen flow: build on the host from backend/scrobble Dockerfiles instead of
pulling from a registry (no registry / no Docker-on-dev needed). Heavy deps are
baked, so restarts are instant and rebuilds after git pull are cache-fast.
Removed the now-obsolete docker-compose.dev.yml (runtime-install variant); the
optional push-to-registry script stays for a future CI flow. Updated README,
CLAUDE.md, .env.example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Opus 4.8 committed 2026-09-02 13:34:00 +02:00
1 parent 1d8d8143f2
commit 767d088665
5 files changed
+33 -105

No files matched your search

+7 -8
View File
@@ -41,14 +41,13 @@ npm run build # production build → dist/
npm run preview # preview the production build
```
Backend runs in Docker. Two compose files:
- **`docker-compose.yml`** (default/production) — PULLS pre-built images (deps baked into
`backend/Dockerfile` + `scrobble/Dockerfile`), so restarts are instant. Build+push from dev with
`npm run push-images` (needs `REGISTRY`/`TAG` in `.env`), then on the host `docker compose pull &&
docker compose up -d`. See `.env.example`.
- **`docker-compose.dev.yml`** — builds on the host (mounts `./backend`, installs deps at container
start). Restart after backend changes: `docker compose -f docker-compose.dev.yml restart
novasonic-backend` (re-pulls yt-dlp).
Backend runs in Docker via **`docker-compose.yml`**, which **builds locally from the Dockerfiles**
(`backend/Dockerfile` + `scrobble/Dockerfile`). The heavy deps (ffmpeg, Deno, yt-dlp, node libs) are
baked into the images, so container **restarts are instant** and a rebuild after `git pull` is fast
(Docker caches the dep layers — only the code COPY layer changes). Deploy: `git pull && docker compose
up -d --build`; a plain restart is `docker compose restart novasonic-backend` (the backend also
re-pulls the latest yt-dlp on each start). No registry needed — an optional pull-from-registry / CI
flow can build the same Dockerfiles elsewhere and push (`scripts/build-push-images.mjs`, `.env.example`).
On the deploy host the music lives at `/opt/navidrome/music`.