Skip to content

fix(compose): make the shipped compose deploy out of the box - #6

Merged
jodacame merged 1 commit into
mainfrom
fix/compose-deploy
Aug 8, 2026
Merged

jodacame merged 1 commit into
mainfrom
fix/compose-deploy

Conversation

@jodacame

@jodacame jodacame commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Follow-up to #5. The docker-compose.yml in the repo was the development one, so docker compose up -d was neither fast nor correctly limited.

Before After
build: . — full multi-stage build, minutes image: ghcr.io/jodacame/fluxtorrent:latest, with # build: . left for development
deploy.resources.limits.memory — ignored by docker compose outside Swarm mem_limit: 1536m, which actually applies
no healthcheck wget on /api/health (busybox is already in the alpine image)

The memory limit mattering is not cosmetic: #5 fixed a container being OOM-killed mid-playback, and the limit that was supposed to bound it was never being applied by docker compose.

Verified by deploying the file as-is:

MemoryLimit=1610612736 bytes          # 1536 MiB, applied
memory: heap limit 1280MB (cache 1024MB)
FluxTorrent 0.3.0 listening on http://0.0.0.0:7001 (cache=ram)
health=healthy                        # exit=0, real JSON payload

/api/health is in isAuthOpenPath, so the healthcheck keeps working when FT_AUTH_PASSWORD is set. Swarm users get a comment pointing back at deploy.resources.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LcSmC4nXzcn2UAofR7JCgZ

Three things kept `docker compose up -d` from being a working deploy:

- `build: .` compiled the full multi-stage image (Node builds the UI, Go
  embeds it) instead of pulling the published one — minutes for what should
  take seconds. Default to ghcr.io and leave the build line commented for
  development.
- `deploy.resources.limits.memory` is ignored by `docker compose` outside a
  Swarm stack, so the memory limit never reached the container. `mem_limit`
  does apply; verified as HostConfig.Memory=1610612736.
- No healthcheck. /api/health stays reachable without credentials even when
  FT_AUTH_PASSWORD is set, so it works on a locked-down instance too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LcSmC4nXzcn2UAofR7JCgZ
@jodacame
jodacame merged commit dbf53d9 into main Aug 8, 2026
2 checks passed
@jodacame
jodacame deleted the fix/compose-deploy branch August 8, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant