Backend: Cloudron container image packaging and Gitea registry workflow #56
Reference in New Issue
Block a user
Delete Branch "adilallo/Backend/ContainerRegistry"
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?
Summary
CloudronManifest.json, productionDockerfile,scripts/start.sh(migrate + privilege drop), andscripts/docker-release.sh(buildx push to Gitea).git.medlab.host) and the operator build/push/install workflow indocs/guides/ops-backend-deploy.md§9.@storybook/addon-interactions, import interaction helpers fromstorybook/test, and bumpnext-intlto v4 sonpm cistays clean inside the Docker build.What changed
Cloudron packaging (CR-97)
CloudronManifest.json— declareshttpPort 3000,healthCheckPath /api/health, 768 MiB memory limit, andpostgresql + sendmail + localstorageaddons; pins image refgit.medlab.host/communityrule/community-rule:0.1.0.Dockerfile— production-oriented multi-stage build:npm ci --ignore-scriptsin deps stage (schema not present yet;prisma generateruns in builder).nodeuser (uid 1000) for Cloudron localstorage mount compatibility.start.shcan runprisma migrate deploy..next/cache → /tmp/next-cacheso ISR works on Cloudron's read-only rootfs.scripts/start.sh— chowns/app/dataand/tmp/next-cache, drops tonode:nodeviagosu, runs migrations, execs Next.js standalone server.scripts/docker-release.sh+npm run docker:release— cross-platformlinux/amd64buildx push to the Gitea registry.Docs
docs/guides/ops-backend-deploy.md— registry decision closed (§6.3); new §9 build/push/install runbook; CR-97 status updated. Staging install (CR-98) remains blocked on CR-96 env bridging.Storybook / deps cleanup
@storybook/addon-interactions(merged into Storybook 8+ core); stories import fromstorybook/test.next-intlto^4.0.0; refresh lockfile.Test plan
npx tsc --noEmit./scripts/docker-release.sh— builds and pushes togit.medlab.host/communityrule/community-rule:<tag>(requires Gitea PAT +docker login)docker logout git.medlab.host && docker pull git.medlab.host/communityrule/community-rule:<tag>— anonymous pull succeeds (Cloudron simulation)CLOUDRON_POSTGRESQL_URL+SESSION_SECRET; confirmGET /api/healthreturns{"ok":true,"database":"connected"}after migrationsnpm run storybook— interaction stories still runnpx vitest run— unit/component suite passes