Deploy/secrets/rollout runbook for the 8syncdev Encore Cloud backend and Vercel frontends. Triggers — "deploy gate/core to encore", "push backend to encore cloud", "set encore secrets", "rollout failed on encore", "build failed on encore", "payos secrets", "rotate a secret", "deploy frontend to vercel", "production deploy". Contains proven gotchas (secrets need a redeploy; vercel drops [...slug] dirs) — read BEFORE any backend deploy, secret rotation, or prod FE deploy.
Install
npx skillscat add 8-sync-dev/8sync/encore-deploy Install via the SkillsCat registry.
encore-deploy — 8syncdev backend (Encore Cloud) + frontend (Vercel) deploy runbook
All facts below are session-verified (2026-06-12). Follow them literally; do not improvise commands.
1. Topology
backend/is a git submodule → GitHub8-Sync-Dev/backend-encore-8sync.- TWO Encore Go apps live in that one repo:
gate/→ Encore app8syncdev-gate-e852(auth + billing)8sync-core/→ Encore app8syncdev-core-cm62(health + coding)shared/is a shared Go module wired viago.work.
- Encore git remotes are already configured inside
backend/:encore-gateandencore-core. Verify:
git -C backend remote -v2. Deploy model (there is NO encore deploy command)
Deploy = git push to the app's Encore remote. The push output prints the rollout URL.
git -C backend push encore-gate main # deploys gate → 8syncdev-gate-e852
git -C backend push encore-core main # deploys core → 8syncdev-core-cm62Also push origin main, then bump the submodule pointer in the monorepo:
git -C backend push origin main
git add backend && git commit -m "chore: bump backend submodule"3. CRITICAL gotcha — secrets do NOT hot-reload (proven 2026-06-12)
encore secret set does NOT reach running instances. Encore Go resolves secrets at boot. After rotating ANY secret you MUST trigger a rollout. An empty commit + push is acceptable:
git -C backend commit --allow-empty -m 'chore: roll secrets'
git -C backend push encore-gate main # and/or encore-core4. Secrets
Set from the app dir (e.g. cd backend/gate):
printf %s '<value>' | encore secret set --type prod,dev,pr <Name>NEVER use --type local — it shadows the env-var fallbacks used by local dev and tests.
| App | Secret | Notes |
|---|---|---|
| gate | AuthJWTSecret |
|
| gate | PayOSClientID |
|
| gate | PayOSAPIKey |
|
| gate | PayOSChecksumKey |
|
| gate | PayOSMode |
live | sandbox |
| gate | AppURLCoding |
e.g. https://coding.8syncdev.com |
| core | AuthJWTSecret |
MUST equal gate's |
| core | JudgeSecret |
MUST equal the Vercel coding project's JUDGE_SECRET env |
| core | JudgeURL |
https://coding.8syncdev.com/api/judge |
5. Logs
encore logs --env=staging is live-tail only — no backfill. Pattern:
(cd backend/gate && encore logs --env=staging > /tmp/gate.log 2>&1 &)
# trigger traffic (curl the endpoint under test)
# then read /tmp/gate.log6. Health probes (verify EVERY deploy)
- Core:
https://staging-8syncdev-core-cm62.encr.app/health/ping→ JSON includesgitSha— MUST match the pushed HEAD. - Gate:
https://staging-8syncdev-gate-e852.encr.app/billing/plans(returns plan list).
7. Platform API (rollout debugging)
Bearer token = access_token field of ~/.config/encore/.auth_token (refreshed by any CLI call).
- Rollout status:
GET https://api.encore.cloud/apps/<slug>/envs/<env>/rollouts/<roll_id> - Retrigger failed rollout:
POST https://api.encore.cloud/apps/<slug>/envs/<env>/rollouts/<roll_id>/retrigger - App root dir:
PATCH https://api.encore.cloud/apps/<slug>/settingsbody{"app_root_relpath":"..."}— already configured: gate=gate, core=8sync-core. Don't touch unless the repo layout changes.
8. Vercel FE deploy runbook (same ops family)
Three projects, team team_nl2xMkM0Uz0QaXTukIHKZPim:
| App | Project ID | Domain |
|---|---|---|
| web | prj_qkUFCls4FBR6ryciob0L8nkyXm33 |
8syncdev.com |
| coding | prj_g4Z1tIXlwmNIE3b3xxXsOFoTfamz |
coding.8syncdev.com |
| app | prj_WXalOR38x8MzijwUbWLGIiILzK9m |
app.8syncdev.com |
Two proven gotchas:
Plain
vercel deployupload SILENTLY DROPS[...slug]directories. ALWAYS deploy prebuilt, from the repo root withVERCEL_ORG_ID/VERCEL_PROJECT_IDexported:export VERCEL_ORG_ID=team_nl2xMkM0Uz0QaXTukIHKZPim VERCEL_PROJECT_ID=<prj_…> rm -rf .vercel && vercel pull --yes --environment=production && vercel build --prod vercel deploy --prebuilt --prod --yesDeployments get BLOCKED (seatBlock
TEAM_ACCESS_REQUIRED) when the git commit-author email is not a verified email on the Vercel account. Fix: verifyatus@8syncdev.comon the account, or temporarily hide git around the deploy call (restore immediately):mv .git .git-hidden && vercel deploy --prebuilt --prod --yes; mv .git-hidden .git
9. Rules
- ALWAYS verify after a deploy: health probe
gitShamatches HEAD and one authed E2E call succeeds — only then claim the deploy works. - NEVER push the monorepo to encore remotes. Only
backend/is pushed toencore-gate/encore-core. - After rotating secrets → redeploy (section 3). No exceptions.
- Never
--type localfor secrets (section 4).