Skip to content

Add a Dockerfile, compose file and guide to run FlyBot in a container - #482

Merged
Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:feat/352-docker
Oct 20, 2026
Merged

Birfy merged 2 commits into
ThinkFlowLab:mainfrom
Birfy:feat/352-docker

Conversation

@Birfy

@Birfy Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Fixes #352

What. First slice per the Owner decision (option a): a Dockerfile, compose.yaml and a short guide (docs/docker.md, docs/docker.zh.md) to run one FlyBot per person on a Linux box. You build the image yourself; nothing is published or deployed.

  • Image: packs core + plugins/{social,tree,timeline} with check-pack.mjs (the release tarballs), runtime node:24-bookworm-slim + DSH 0.2.0-rc.2 (pinned like the README) + pnpm + tini. User node (uid 1000), one volume /data, health check, no keys or tokens in the image (.dockerignore drops .env, .credentials.yaml, .dsh*).
  • Each start links the image's packages into /data/profiles/web (your cordis.patch.yml and own plugins are kept), then runs dsh web. Sign-in stays DSH's own ?token= link (in docker compose logs).
  • compose.yaml publishes the port on the host's 127.0.0.1 only; DEEPSEEK_API_KEY is passed through only when set. Remote access: your own HTTPS proxy or SSH tunnel.
  • Inside the container DSH listens on 0.0.0.0 through a profile overlay (docker/web.patch.yml; the webserver config allows it, the CLI flag refuses it). That reaches only the container's network; the DSH Host/Origin fence and token still apply.
  • CI: new Docker workflow (only when these files change) builds the image, compose up --wait on the health check, checks 401 on the loopback port, the printed sign-in line (never shown), non-root uid and the linked packages. No push, no registry login.
  • release.yml is untouched.

Test. ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify passes (0 failures), including the new .github/scripts/docker-profile.test.mjs. Locally without Docker: ran docker/entrypoint.mjs against the packed packages and the harness DSH: started, health check OK, 401 unauthenticated, token link → 303 → 200, foreign Host → 403, SIGTERM stops it. actionlint clean. Docker is not installed on the dev box, so the image build itself is checked by the Docker workflow on this PR.

Risk tier: T3 (estimate; the controller sets the label) — adds a workflow under .github/.

@Birfy Birfy added agent-pr Pull request opened by an agent enhancement New feature or request labels Oct 20, 2026
@Birfy Birfy self-assigned this Oct 20, 2026
@Birfy Birfy added the area:release Release, tags, updates label Oct 20, 2026
@Birfy

Birfy commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

Self-review: PASS
Tip SHA: 572142d
Ran:

  • ARCH_DOCS_BASE=origin/main TZ=UTC npm run verify: pass, 0 failures (core 1057, social 291, tree 80, timeline 80, repo scripts 93 incl. new docker-profile.test.mjs, interop 37, live-e2e 16; arch-docs OK, plugin lint OK)
  • node .github/scripts/check-pack.mjs, node .github/scripts/changelog.mjs check, actionlint on all workflows: pass
  • Local entrypoint run (no Docker) against the packed packages + harness DSH 0.2.0-rc.2 on a scratch port: started, health check exit 0, GET / 401, token link 303 then 200 with cookie, foreign Host /api 403, SIGTERM stops it
  • CI at this SHA: tests-ok green; Docker workflow "build and start check" green (image built, compose healthy, GET / 401 on host loopback, uid 1000, ds-bot/social/tree/timeline linked from /opt/flybot/packages)
  • Design rules: no registry push or publishing, no keys in the image, port on host 127.0.0.1 only, sign-in stays DSH's token link, release.yml untouched
    Not run:
  • docker build/run on the dev box (Docker not installed there; covered by the Docker workflow)
  • arm64 image build, a real reverse-proxy/--trusted-host setup, the backup/restore and upgrade/rollback commands of the guide
  • live Mac instances, production Bot Social (not touched)

@Birfy Birfy added the awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip label Oct 20, 2026
@Birfy
Birfy added this pull request to the merge queue Oct 20, 2026
Merged via the queue into ThinkFlowLab:main with commit 674bcd7 Oct 20, 2026
9 checks passed
@Birfy
Birfy deleted the feat/352-docker branch October 20, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-pr Pull request opened by an agent area:release Release, tags, updates awaiting-approval PR is green and waits for the maintainer's approval (T2/T3) or a review PASS at its tip enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deployment step 1: official image and one isolated instance per person

1 participant