Repository navigation
fix(lemmy): the bundle starts, and the generated admin can log in (lemmy 1.0.4) - #511
Merged
Merged
Conversation
…mmy 1.0.4) The Lemmy bundle never started on the pinned images: - the entrypoint ran /app/lemmy; dessalines/lemmy:0.19.17 ships /usr/local/bin/lemmy_server (the image's own entrypoint); - it wrote its config into ./config, mounted read-only, as uid 1000; - both health checks called wget, which neither the lemmy nor the lemmy-ui image has, so lemmy never turned healthy and lemmy-ui never started; - pict-rs runs as uid 991 and got a host folder the Docker daemon creates as root. Now the entrypoint writes a mode-600 config into the container's own /tmp at every start and execs lemmy_server; the hostname reaches the script through the environment and is checked (bare hostname only) before use; health checks use curl; Postgres and pict-rs data live in this compose project's own volumes, so uninstall with delete data removes both; the config holds only keys Lemmy 0.19 reads (tls_enabled true because Caddy serves https); pict-rs limits use the 0.5 key names; LEMMY_FEDERATION_ENABLED and LEMMY_OPEN_REGISTRATION are gone (site settings in 0.19). The generated LEMMY_ADMIN_PASSWORD (keychain) still reaches Lemmy's first-start setup only through the environment. Docs: lemmy-ui does not proxy the API (checked live: 404), so the notes, skill and post-install text say the public site must split /api, /pictrs, /feeds, /nodeinfo, /.well-known and ActivityPub traffic to lemmy:8536. Licensing note added (AGPL-3.0 Lemmy/lemmy-ui/pict-rs, separate containers). Claude-Session: https://claude.ai/code/session_01N9fXzvNy8rCEArj1y5p6fp
…tead of writing an empty archive Review follow-ups: the hostname must be bare and lowercase with no leading or trailing dot, colon or dash and no empty label; a test runs the entrypoint's own case pattern against good and bad values. backup.sh refuses when pict-rs is not running or its archive is empty. Claude-Session: https://claude.ai/code/session_01N9fXzvNy8rCEArj1y5p6fp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces #510. #510 was stacked on #504, which has since been squash-merged to
main(3a5c7be, together with #505). This PR has the same two Lemmy commits, rebased ontomainwith nothing from #504 repeated. The tree matches #510's head, so #510's live proof and reviews still apply. The details are in #510's description and comment; here is the summary.Why Lemmy never started (checked against the pinned images)
exec /app/lemmy.dessalines/lemmy:0.19.17has no/app: the binary is/usr/local/bin/lemmy_server, and the image runs as uid 1000./config/config.hjsoninto./config, which was mounted:ro.wget, and neither image ships it (both havecurl). Lemmy never became healthy, solemmy-uinever started.federation.enabled,captcha) and pict-rs 0.4 names that 0.5 ignores did nothing.tls_enabled: falsegavehttp://actor ids behind Caddy's https.Fix
/tmpat every start, thenexec lemmy_server.curl.tls_enabled: true.LEMMY_FEDERATION_ENABLEDandLEMMY_OPEN_REGISTRATION. These are site settings in 0.19.backup.sh: fails loudly instead of writing an empty archive.Live proof (scratch home only; details in #510)
~/.crow*..env, then runcheckBundleCompose, which returned{"valid":true}./api/v3/sitereturned 200.admin: true. A wrong password returned 401.Follow-ups (not fixed here)
lemmy:8536, whichcaddy_add_federation_sitecan't express yet.LEMMY_URL=http://lemmy:8536. The sibling federated bundles have the same pattern.Licensing
Tests
tests/lemmy-bundle.test.js(11 tests) and fix(bundles): the install security check reads what Compose applies, on every compose-up path; our own bundles pass it #508'stests/bundle-compose-gate.test.jspass. The full suite passed on the pre-rebase tree, which is identical.https://claude.ai/code/session_01N9fXzvNy8rCEArj1y5p6fp