gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit477d7bdc477d7bdcMerge branch 'p50'mre477d7bdc/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

  • 477d7bdcMerge branch 'p50'mre
  • 00efc06fP50 reportmre
  • e3f85afblog: commit mention slipmre
  • 4d1a4cf4log: #25 numbersmre
  • 1af0a60ddocs: H25 run() correctionmre
  • eefa2dbcRepo setting: refuse direct pushes to the main branch (pre-receive over HTTPS and ssh)mre
  • 8c8ba2f1log: PR flow announcedmre
  • fa00cd35log: Kunibert pings provenmre
  • 3a68cfaclog: components decisionmre
  • 87de8e31log: Kunibert connected to 9 app reposmre
  • c22aff69log: PR-only rollout startedmre
  • 25309981log: STOP and paused workers 2026-11-08mre
  • 5286803alog: worker briefs and reports of 2026-11-08mre
  • 85c86605log: 2026-11-08 Arachne on list shapemre
  • cb634512log: 2026-11-08 keyed lists livemre
  • 07c98d4aLists: keyed rows with @id, remove(id) and one whole-list assignment instead of hand-rebuilt loopsmre
  • 0db0d81elog: 2026-11-08 day52 live, W30 startedmre
  • b05f6d92tests/status: the gate's 3 s app token expired during the restart; it lives 60 s like status-keyedmre
  • 1e8f4f0avendor: Hybriel set-day52 (fault-path leak fix #335, keyed rows #331)mre
  • f5f0fb7blog: 2026-11-08 day50/#29 live, H25 correction, V52 startedmre