gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchf1-broken-json2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mref1-broken-json/docker-compose.yml

4.9 KB

  1. # gitoria.worldapi.org on Byrodin — same pattern as tickets.worldapi.org: ./Dockerfile = debian:12-slim +
  2. # libssl3 + ca-certificates, host network, the app on 127.0.0.1:45004, nginx proxies it and ends TLS
  3. # (the vhost needs the WebSocket Upgrade headers: the live push rides `/`).
  4. # THE VHOST IS A WILDCARD: `server_name gitoria.worldapi.org *.gitoria.worldapi.org;` — every repo
  5. # is <slug>.gitoria.worldapi.org and reaches this one app; the app reads the host in the browser
  6. # (README "How a repo gets its address"). Wildcard DNS + a wildcard certificate are the architect's.
  7. # HYBRIEL COMPILES THE APP AT ITS START (static build 0f396652): scratch files go to /tmp (a tmpfs here), the build cache to
  8. # HL_CACHE_DIR = /root/.hybriel/cache inside the named volume `hybriel-cache`, so a restart starts warm and only a new
  9. # binary or changed code compiles again (cold ~18 s).
  10. # The whole folder is the bind mount: storage/mpackdb/ and .sessions/ live here and persist.
  11. # LOGIN VIA IDENT: IDENT_API_KEY and IDENT_API_SECRET come from `.env` in this folder (never written
  12. # here). The app is registered in ident with ONE origin, https://gitoria.worldapi.org (repo
  13. # addresses log in through it and come back: README "Login").
  14. # IDENT_EXCHANGE_URL: the server-side code exchange goes straight to ident's loopback port.
  15. services:
  16. gitoria:
  17. container_name: gitoria.worldapi.org
  18. init: true # hybriel#156: the app as PID 1 ignores SIGTERM (restart waited 10 s)
  19. build: .
  20. image: "gitoria-runtime:debian12" # own tag (2026-10-31): only gitoria installs git + openssh-client; the shared tag was overwritten by another app
  21. working_dir: /home/gitoria
  22. network_mode: host
  23. restart: unless-stopped
  24. ulimits:
  25. nofile: { soft: 65536, hard: 65536 } # Hybriel int 6+ opened >1024 files at boot in the tracker (errno 24, 2026-10-22)
  26. environment:
  27. - HL_HOST=127.0.0.1
  28. - GITORIA_PORT=45004
  29. - GITORIA_WATCH=0
  30. - IDENT_EXCHANGE_URL=http://127.0.0.1:45002
  31. - GITORIA_SSH_SECRET=${GITORIA_SSH_SECRET:-}
  32. - GITORIA_SSH_PORT=${GITORIA_SSH_PORT:-2222}
  33. - GITORIA_SSH_HOST=${GITORIA_SSH_HOST:-}
  34. - HL_CACHE_DIR=/root/.hybriel/cache
  35. volumes:
  36. - ./:/home/gitoria
  37. - hybriel-cache:/root/.hybriel
  38. tmpfs:
  39. - /tmp:exec,mode=1777
  40. command: ./bin/hybriel project.hl
  41. # STANDBY (deploys without a gap): the same image and the same bind mount on port 45014 (= main port + 10). nginx lists it as the
  42. # `backup` server of the gitoria upstream, so it only gets requests while 45004 is down. The profile keeps `docker compose up -d` from
  43. # starting it; ../worldapi-conductor/standby-swap.sh starts it for a deploy and stops it again. gitoria has no background jobs or timers.
  44. # About 40 s with two processes. Sessions are kept
  45. # in memory and saved to .sessions: a login made on one process is unknown to the other until that one restarts and reloads them (a rare
  46. # visitor who logs in during those seconds may have to sign in once more). Repo and user data are read from the shared storage.
  47. gitoria-standby:
  48. init: true # hybriel#156: the app as PID 1 ignores SIGTERM (restart waited 10 s)
  49. build: .
  50. image: "gitoria-runtime:debian12" # own tag (2026-10-31): only gitoria installs git + openssh-client; the shared tag was overwritten by another app
  51. working_dir: /home/gitoria
  52. network_mode: host
  53. ulimits:
  54. nofile: { soft: 65536, hard: 65536 } # Hybriel int 6+ opened >1024 files at boot in the tracker (errno 24, 2026-10-22)
  55. volumes:
  56. - ./:/home/gitoria
  57. - hybriel-cache:/root/.hybriel
  58. tmpfs:
  59. - /tmp:exec,mode=1777
  60. command: ./bin/hybriel project.hl
  61. container_name: gitoria.worldapi.org-standby
  62. profiles: ["standby"]
  63. restart: "no"
  64. environment:
  65. - HL_HOST=127.0.0.1
  66. - GITORIA_PORT=45014
  67. - GITORIA_WATCH=0
  68. - IDENT_EXCHANGE_URL=http://127.0.0.1:45002
  69. - GITORIA_SSH_SECRET=${GITORIA_SSH_SECRET:-}
  70. - GITORIA_SSH_PORT=${GITORIA_SSH_PORT:-2222}
  71. - GITORIA_SSH_HOST=${GITORIA_SSH_HOST:-}
  72. - HL_CACHE_DIR=/root/.hybriel/cache
  73. # git over SSH (ticket gitoria#7): sshd that only runs git-upload-pack / git-receive-pack; keys and permissions are asked from the app
  74. # at 127.0.0.1:45004 (docker/sshd). Needs GITORIA_SSH_SECRET in `.env` (any long random text; the app gets the same) — without it SSH is
  75. # not offered on the site. The port must be open in the firewall and DNS must point gitoria.worldapi.org at this host (the architect's).
  76. gitoria-sshd:
  77. container_name: gitoria-sshd
  78. build: ./docker/sshd
  79. network_mode: host
  80. restart: unless-stopped
  81. ulimits:
  82. nofile: { soft: 65536, hard: 65536 } # Hybriel int 6+ opened >1024 files at boot in the tracker (errno 24, 2026-10-22)
  83. environment:
  84. - GITORIA_SSH_SECRET=${GITORIA_SSH_SECRET:?set GITORIA_SSH_SECRET in .env}
  85. - GITORIA_SSH_PORT=${GITORIA_SSH_PORT:-2222}
  86. - GITORIA_URL=http://127.0.0.1:45004
  87. volumes:
  88. - ./storage/git:/repos
  89. - ./storage/sshd-hostkeys:/hostkeys
  90. volumes:
  91. hybriel-cache:

Branches

Latest commits

  • 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
  • f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
  • 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre
  • 16a3530fMerge branch 'heap-revert' into mainGitoria
  • 220a80e0|||PR Remove temporary /__heap route and heap helper; logmre
  • 13f0c342Merge branch 'hl25-records' into mainGitoria
  • a002ecb7|||PR records: HL25 report, heap helper, logmre
  • 2492a55cTemporary keyed /__heap route for the live memory snapshotmre
  • fefaedd2log: tracker PR-only, HL25 startedmre
  • 21aa57calog: parkmre
  • e9f950a8reports: G25c soakmre
  • a7783686log: deploy 9f41ffcmre
  • 9f41ffc1log: W30b mergedmre
  • bef635c1Merge branch 'w30b'mre
  • 15b996a5Org list: keyed rows by @id, newest first, concat instead of hand loopmre
  • c4f6d9e3reports: G25c growth huntmre
  • b88e39f1log: privacy cleanup donemre
  • bfd7826ddocs: neutral example organisation namemre
  • 01b71c2edocs: neutral wording in missions, reports and logmre
  • 3eeea733log: 2026-11-09 PR flow plan and membersmre