Skip to content

feat(docker): resource limits, log rotation, and supply-chain pins - #170

Merged
jouwdan merged 3 commits into
mainfrom
claude/mei-17-mei-19-b2x0tb
Aug 20, 2026
Merged

feat(docker): resource limits, log rotation, and supply-chain pins#170
jouwdan merged 3 commits into
mainfrom
claude/mei-17-mei-19-b2x0tb

Conversation

@jouwdan

@jouwdan jouwdan commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Production-hygiene and supply-chain hardening for the deploy path.

Resource limits and log rotation

Every long-running service in compose.yml, compose.coolify.yml, and compose.demo.coolify.yml now carries a memory and CPU ceiling and rotates its own logs at three files of 10 MB, so a crash-looping container under restart: unless-stopped can no longer write the disk full. The ceilings default to small-VPS values (web 1g/2 cpus, postgres 1g/1, worker 768m/1, valkey 256m/0.5) and deliberately oversubscribe the documented 2 GB minimum: they exist to contain a failure within one container, not as reservations.

The limits interpolate from the environment (WEB_MEM_LIMIT, WEB_CPUS, POSTGRES_MEM_LIMIT, POSTGRES_CPUS, WORKER_MEM_LIMIT, WORKER_CPUS, REDIS_MEM_LIMIT, REDIS_CPUS), so a by-hand deployment tunes them in the same untracked .env the secrets live in and a Coolify deployment sets them on the resource the way MEITH_IMAGE already works — an upgrade's git checkout never collides with an operator's tuning, and nobody forks the compose file to resize a board.

Digest-pinned images

node:26-alpine, postgres:16-alpine, valkey/valkey:8-alpine, alpine:3.20, and curlimages/curl:8.11.1 are pinned by multi-arch manifest digest across both Dockerfiles and all four compose files. The ghcr.io/meith-dev/meith release pin is untouched — releases move it, and release-check still passes. Dependabot gains a docker-compose ecosystem entry for /docker, because the existing docker entry only reads Dockerfiles and would not bump the compose digests.

SHA-pinned workflow actions

actions/checkout, actions/setup-node, pnpm/action-setup, and docker/login-action are pinned to full commit SHAs (resolved from their live tags, version kept as a trailing marker for Dependabot) across ci.yml, release.yml, and cut-release.yml — the workflows that hold packages: write and publish rights no longer run whatever a mutable tag points at.

Docs, same change

self-hosting.md documents the ceilings, the tuning variables, the override-file escape hatch, and the oversubscription rationale; quickstart.md adds the Coolify equivalent beside the MEITH_IMAGE instructions; .env.example lists the new variables; release.md extends its pinning section to base images and actions.

Validated with docker compose config on every file (profiles included, overrides proven to flow through) and a full green pnpm verify.

🤖 Generated with Claude Code

https://claude.ai/code/session_011TkUEQhzDEpjYSgJLqeBDb


Generated by Claude Code

claude added 3 commits August 20, 2026 13:25
Every long-running compose service now carries a memory and CPU ceiling
sized for a small VPS and rotates its own logs at three files of 10 MB,
so a crash-looping container can no longer fill the disk. Base images
are pinned by digest in the Dockerfiles and every compose file, workflow
actions are pinned to full commit SHAs, and Dependabot gains a
docker-compose ecosystem entry so the new digest pins stay current.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011TkUEQhzDEpjYSgJLqeBDb
The memory and CPU limits interpolate from the same .env the secrets
live in, defaulting to the shipped small-VPS values, so a larger machine
is a variable beside the compose file rather than an edit to it — and an
upgrade's git checkout has nothing of the operator's to collide with.
Under Coolify the same variables are set on the resource, the way
MEITH_IMAGE already is.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011TkUEQhzDEpjYSgJLqeBDb
@jouwdan
jouwdan merged commit 57ddd5b into main Aug 20, 2026
19 of 20 checks passed
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.

2 participants