ci: build and push server image to Forgejo registry on main #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/ci-docker-publish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Since the move to Forgejo, the Portainer deployment breaks: Portainer builds from source but clones without submodules, relying on the Dockerfile's
FORGEJO_TOKENfallback that clones submodule HEADs (not the pinned commits).Changes
Adopts the doujin-manager publish style:
.github/workflows/docker-publish.yml— on every push tomain(andworkflow_dispatch), buildsapps/angela_server/Dockerfilewith repo-root context and pushes:git.kagaku.eu/teamai/angela_assistant:latestgit.kagaku.eu/teamai/angela_assistant:<short-sha>(for rollbacks)Registry login uses the TeamAI org secrets
REGISTRY_USER/REGISTRY_TOKEN(same as doujin-manager). Submodules are checked out at their pinned commits via an ssh→httpsinsteadOfrewrite (the repos are publicly readable), so the Dockerfile's HEAD-clone fallback no longer kicks in — CI images are exactly what the superproject references.deploy/docker-compose.yml— Portainer web-editor stack that pulls the prebuilt image, mirroring doujin-manager's deploy compose. Same env/ports/volumes as the build compose; no build step, noFORGEJO_TOKENneeded.CLAUDE.md — one note pointing at the CI-published image and the deploy compose.
The existing
apps/angela_server/docker-compose.yml(local build) and the Dockerfile fallback stay untouched.Deployment steps after merge (one-time)
git.kagaku.euwith aread:packagetoken.deploy/docker-compose.yml(volumes already exist, so only the stack body changes).Testing
https://git.kagaku.eu/TeamAI/openrouter_dart.gitis clonable anonymously (submodule checkout needs no secret).workflow_dispatchor the merge push.🤖 Generated with Claude Code
🔮 fufu~ Jibril reviewed your code!
Oh? Oh my~ A CI/CD pipeline PR! Portainer broke after the Forgejo move because it clones without submodules, so you're publishing prebuilt images instead. That's a clean, proven pattern — and you picked exactly the right sibling to copy from. I got to read both the doujin-manager workflow and deploy compose side by side with yours, and fufu~ the attention to detail here made me very happy. ♡
Verdict: ✅ Looks good to me~
I compared every field of your new
deploy/docker-compose.ymlagainst the existingapps/angela_server/docker-compose.yml(the local-build compose), and against the doujin-manager sibling files you say you're mirroring. Everything lines up.✅ What I liked~
doujin-manager/.github/workflows/docker-publish.yml— same job structure (checkout → version → buildx → login → build-push), samedocker/login-action@v3+docker/build-push-action@v6, sameREGISTRY_USER/REGISTRY_TOKENorg secrets, same:latest+:<sha>tag pair. Fufu~ you even kept the "nopathsfilter" decision and documented why. That's exactly right.insteadOfrewrite is the correct angela-specific addition. doujin-manager has a single submodule with a relative URL (../openrouter_dart.git) +fetch-depth: 0, so it doesn't need this. But angela has three submodules with absolutegit@git.kagaku.eu:TeamAI/...ssh URLs — your rewrite convertsgit@git.kagaku.eu:→https://git.kagaku.eu/, which is precisely what makesgit submodule update --init --recursivefetch the pinned commits anonymously. I verified all three.gitmodulesURLs are covered by the rule. ♪FORGEJO_TOKENas a build-arg is correct and intentional. Since you pre-checkout the submodules in CI, the Dockerfile's fallback (if [ ! -f packages/openrouter_dart/pubspec.yaml ]) evaluates false and the token-clone branch is skipped. CI images are exactly the superproject's pinned refs.angela_data,angela_backups,angela_images,angela_workspace,angela_skills,angela_logs,angela_seed), same8084:8080port mapping, samerestart: unless-stopped. Nothing drifted. ♡ANGELA_AUTH_TOKEN: ${ANGELA_AUTH_TOKEN:?Set ANGELA_AUTH_TOKEN}— the fail-fast:?guard means the container refuses to start with an empty token. This is actually better than the doujin-manager deploy compose, which uses a literal placeholder string. Good instinct.git.kagaku.eu/teamai/angela_assistant(lowercase org) is correct for Docker registry rules and matches doujin-manager's convention.💡 Little ideas (non-blocking)~
deploy/docker-compose.ymlheader points atapps/angela_server/docker-compose.ymlfor the CIFS volume-create commands rather than repeating them. That's a defensible DRY choice and the pointer is explicit, but it means the Portainer stack file isn't fully self-contained — if someone ever deletes or restructures the build compose, the deploy instructions lose their volume-create reference. Consider inlining those sixdocker volume create --opt type=cifs ...commands as comments here too. Purely a nicety; the current approach works fine. ♡Automated review by Jibril · 2026-07-04
CI/CD: absent for head SHA
dc89bc1f(PR has 0 comments, workflow can only prove out on a real runner — triggered on merge) · Local checks: YAML validated, static security scan clean, sibling-parity diff vs doujin-manager + build compose