0
2
Deploy grain-serve from main in place of the old server
Draftchadtmiller.com added 250 commits
- 65710ba
- 7004708
- 295b831
- fdd3523
- 4fad0e6
- 91b0b1c
- 311206f
- 434954c
- 7f472ad
- bb45374
- bcf8f1c
- 1345063
- da947b7
- d7d2ab1
- b981589
- ea052f5
- eb918e9
- 3dce374
- 4fc425c
- cc3e40f
- 801cc65
- 8042129
- 517cde0
- 9aa342e
- 0b1acfa
- d658e39
- cc27c5c
- 09cbafc
- 014f659
- d34481d
- 6855fc6
- 842e047
- e5c697f
- 06fcdf7
- cd804ba
- 1820781
- c3d387d
- 3382059
- a5130fe
- 8707ce6
- 496228d
- 178aa38
- 148d95f
- 97fdfc4
- e34cd53
- ba2916a
- 6afff98
- 4271ae5
- 75f73e6
- 3349f20
- 9144da3
- 98e27d3
- b1cd8c8
- 30c0525
- ca043b0
- e8beadd
- 53ecb2e
- 1a9acf4
- a8136db
- 775480d
- bc8ad41
- b43a3ba
- 3b36741
- 62d922d
- 63a4278
- 8dc5059
- 688ec14
- 7536901
- ac4f109
- 63dc79f
- 8bd6364
- 4909047
- 5b94549
- 62b8e16
- c1132da
- b76c2f8
- 2ce916f
- 11fe40f
- fabd19c
- 45921cd
- ca53899
- e52dbcc
- 16f3b73
- f8f4bb0
- af38c5e
- 59c2388
- 0581bfa
- 92f7c8c
- ff6be0d
- ab3fa56
- 9ab9cdd
- 586d387
- a5b0767
- 7d2bbba
- be67d4b
- 839bd50
- e04e14b
- 103aebd
- f845866
- 9d4b541
- 5b41fdd
- a7a8ce7
- 270ad01
- 852e9b1
- 32b56f7
- 3c2008a
- 8bef4a6
- eea1c93
- da30f44
- 66ad04c
- 1e8d010
- 2f4d04c
- c3bfce3
- d2f1ead
- 3309e01
- bac3050
- aa9c9f7
- 8eed7cc
- 54d51e5
- b3a8785
- 3ee073d
- 06e8bc6
- 091e964
- c385e04
- f70e6a6
- e6eb865
- c3eaf72
- 7761fec
- 6df7d49
- fc5f686
- ccb3d8d
- b74fd63
- e0f3fc5
- 8ec5991
- 9162fb8
- 3af15d9
- a5a9c85
- e2d904a
- c365353
- ea7a7df
- a4376d8
- 1f4da22
- 40b13ea
- f43bd9b
- db0e62d
- 0020382
- 164794a
- f59172c
- ee083ea
- df95ac7
- dba7c9c
- f086377
- 6210e92
- a3dac06
- 421b83b
- 7162529
- 8711907
- d5dc392
- f63abbe
- 865042d
- 42065d0
- 9ba88a1
- 2e66775
- 1caa934
- 67d8d95
- b45225e
- d0b3ee4
- 92c202b
- 2b27db8
- e9fb496
- 5618b72
- 521183a
- 7197135
- d659745
- a196eff
- 66fa278
- 2fabe11
- d071e0b
- 48472f4
- 7d031dc
- c415344
- 4de8a68
- 21e922e
- 8f2a2ce
- b901429
- 4060fd1
- a1884f1
- 6797ea7
- 5be6e69
- 5f5fddc
- bd8a3a0
- 236806f
- 2db06b7
- de6dd09
- bc600f6
- 0362694
- fc53a26
- 6d83971
- 785dbe4
- 678efc7
- 12bc6ea
- 93e66cb
- 7482d4b
- 96c9c58
- aceca64
- cafedc5
- 612a536
- 03a7f0e
- 37667dc
- 427fee0
- 8671056
- 97abdb8
- e270790
- 35d4a6c
- ea6fba3
- 1ebfeab
- 332f80f
- 2c2d8a8
- 7940011
- c5375ff
- 62906a1
- c9bc218
- 9fdd8a5
- c9b7fb4
- 8e53b84
- 8a2e131
- 59ff347
- 54571d1
- 4a82c5b
- 98e1b24
- fde30fe
- 3c1bbc3
- 305319e
- 682d56b
- 20c6a3e
- 64963a7
- d952aa5
- 44539eb
- c2db22d
- 8e73900
- 615d92a
- d4cd85e
- adaa85d
- 7288cc6
- e2347d8
- 2505b65
- a5081ff
- 0a70e51
- fba830e
- 7dd853f
All checks have passed
5 passed

What changes
main deploys grain-serve. The root
Dockerfileis grain-serve's (with its pages, thegrainCLI,grain-mcpandgrain-import), moved fromdeploy/Dockerfile, and.dockerignorefromdeploy/Dockerfile.dockerignore, replacing the old server's..knotless/workflows/deploy.ymlrunsdeploy/deploy.sh buildon the host while the commit's checks run,deploy/deploy.sh uponcecheck,test,webandlexiconshave passed, anddeploy/deploy.sh dropwhen one fails or main has moved past the commit. Deploys go to the compose project/etc/grain-serve, with the index at/mnt/data/grain-serve/index.db;/etc/grain'sgrainservice is no longer touched.Production's settings are in deploy.yml's
env:, since deploy.sh writes the host's/etc/grain-serve/.envfrom its environment, whole:GRAIN_HOST,GRAIN_DOMAIN=grain.social,GRAIN_CDN=https://cdn.grain.social,GRAIN_ADMIN_DIDS, the APNs key ID, team and topic,GRAIN_FCM_PROJECT_ID, andGRAIN_CARRY_COOKIES_UNTIL=2026-12-15T00:00:00Z(the old server's cookies last 30 days).GRAIN_PROXY_NETWORKandGRAIN_DATAkeep deploy.sh's defaults. The secrets stay in the host's/etc/grain-serve/serve.env.The checks.
rust.ymlbecomescheck.ymlandharness.ymltest.yml, replacing the Node ones. What the Nodecheck.ymlandtest.ymlran (npm run check, which is vp check and svelte-check overweb/, thennpm test) moves to a newweb.yml, so the pages stay checked, and deploys wait on it: the pages ship in the same image.publish-lexicons.ymlwaits on the same four.Docs.
deploy/README.mddescribes the deploy as it is now, with no "Until cutover" or "At cutover".AGENTS.md's production section covers/etc/grain-serve,just logs, queryingindex.dbwith the image'snode:sqlite, and the tables grain-serve's index cannot rebuild (oauth_key,web_session,carried_cookie_key,push_token,preference,notification_pref,notification_seen,label,mute,report,story_view,space_support,space_invite,takedown).It also merges main's three commits since feature/rust left it: hatk alpha.115, photo writes always sending
alt, andapp-version.json. Git placed that file inweb/static/, where feature/rust already has the same content.Why
This is the repository's part of moving grain.social from the hatk appview to grain-serve on the Hetzner host. It cuts from
feature/rustand brings that whole branch onto main.Merging this is a step of the cutover script in hetzner-infra. Do not merge it before the host has switched: before Caddy proxies grain.social to
grain-serve, the old server's database has been imported into/mnt/data/grain-serve/index.db, and the push key files are under/mnt/data/grain-serve/certs. The first push to main after the merge deploys grain-serve over whatever/etc/grain-serveholds.How it was checked
check,test,web,lexicons,e2e).bash -n deploy/deploy.sh, and each workflow parsed as YAML.Shortcomings
server/,hatk.config.ts, the hatk dependency) is left in place for the rollback window.web.ymlstill runs its tests. Removing it is a follow-up pull.deploy/deploy.shby hand once first, which fills the cargo cache mounts this build reads.grain-backup.shdumps the old server's/mnt/data/grain/grain.db. Pointing it at grain-serve's tables is hetzner-infra's change.Review
Start with
.knotless/workflows/deploy.yml, then theenv:againstdeploy/deploy.sh's header.🤖 Generated with Claude Code