gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit74ec2af874ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria74ec2af8/docker-compose.yml

5.2 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. # Opt-in GC allocation budget: gitoria#25, hybriel#374, docs/GC-BUDGET.md.
  35. - HL_GC_BUDGET_MB=32
  36. - HL_CACHE_DIR=/root/.hybriel/cache
  37. volumes:
  38. - ./:/home/gitoria
  39. - hybriel-cache:/root/.hybriel
  40. tmpfs:
  41. - /tmp:exec,mode=1777
  42. command: ./bin/hybriel project.hl
  43. # STANDBY (deploys without a gap): the same image and the same bind mount on port 45014 (= main port + 10). nginx lists it as the
  44. # `backup` server of the gitoria upstream, so it only gets requests while 45004 is down. The profile keeps `docker compose up -d` from
  45. # starting it; ../worldapi-conductor/standby-swap.sh starts it for a deploy and stops it again. gitoria has no background jobs or timers.
  46. # About 40 s with two processes. Sessions are kept
  47. # 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
  48. # visitor who logs in during those seconds may have to sign in once more). Repo and user data are read from the shared storage.
  49. gitoria-standby:
  50. init: true # hybriel#156: the app as PID 1 ignores SIGTERM (restart waited 10 s)
  51. build: .
  52. image: "gitoria-runtime:debian12" # own tag (2026-10-31): only gitoria installs git + openssh-client; the shared tag was overwritten by another app
  53. working_dir: /home/gitoria
  54. network_mode: host
  55. ulimits:
  56. nofile: { soft: 65536, hard: 65536 } # Hybriel int 6+ opened >1024 files at boot in the tracker (errno 24, 2026-10-22)
  57. volumes:
  58. - ./:/home/gitoria
  59. - hybriel-cache:/root/.hybriel
  60. tmpfs:
  61. - /tmp:exec,mode=1777
  62. command: ./bin/hybriel project.hl
  63. container_name: gitoria.worldapi.org-standby
  64. profiles: ["standby"]
  65. restart: "no"
  66. environment:
  67. - HL_HOST=127.0.0.1
  68. - GITORIA_PORT=45014
  69. - GITORIA_WATCH=0
  70. - IDENT_EXCHANGE_URL=http://127.0.0.1:45002
  71. - GITORIA_SSH_SECRET=${GITORIA_SSH_SECRET:-}
  72. - GITORIA_SSH_PORT=${GITORIA_SSH_PORT:-2222}
  73. - GITORIA_SSH_HOST=${GITORIA_SSH_HOST:-}
  74. # Opt-in GC allocation budget: gitoria#25, hybriel#374, docs/GC-BUDGET.md.
  75. - HL_GC_BUDGET_MB=32
  76. - HL_CACHE_DIR=/root/.hybriel/cache
  77. # git over SSH (ticket gitoria#7): sshd that only runs git-upload-pack / git-receive-pack; keys and permissions are asked from the app
  78. # 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
  79. # 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).
  80. gitoria-sshd:
  81. container_name: gitoria-sshd
  82. build: ./docker/sshd
  83. network_mode: host
  84. restart: unless-stopped
  85. ulimits:
  86. nofile: { soft: 65536, hard: 65536 } # Hybriel int 6+ opened >1024 files at boot in the tracker (errno 24, 2026-10-22)
  87. environment:
  88. - GITORIA_SSH_SECRET=${GITORIA_SSH_SECRET:?set GITORIA_SSH_SECRET in .env}
  89. - GITORIA_SSH_PORT=${GITORIA_SSH_PORT:-2222}
  90. - GITORIA_URL=http://127.0.0.1:45004
  91. volumes:
  92. - ./storage/git:/repos
  93. - ./storage/sshd-hostkeys:/hostkeys
  94. volumes:
  95. hybriel-cache:

Branches

Latest commits

  • 74ec2af8Merge branch 'w54-repo-rename-pr' into mainGitoria
  • 9f7ce8d8Preserve rename compatibility and live page titlesmre
  • c3d95b6e|||PR separate names and addresses, rename repositories in Settings (#53)mre
  • ce08920dMerge branch 'w52c-header-phone' into mainGitoria
  • 0bab9e46|||PR header: ident status wraps on phones instead of clippingmre
  • e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
  • c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
  • 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
  • 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
  • 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
  • 155861f6Merge branch 'w52-person-approval' into mainGitoria
  • b5435de8|||PR person approvals: second Kunibert round (#52)mre
  • 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre
  • 2a89d8d0|||PR person approvals: Approve button for people; merge needs the required checks or a listed person's approval (#52)mre
  • 83f0c953Report person approval verificationmre
  • 3ae94b86Record browser failures and verify owned tab cleanupmre
  • 54eec687Gate person approvals and merge alternativesmre
  • 12b08829Add person approvals for pull request headsmre
  • 55c84779Merge branch 'gp-gate-ports' into mainGitoria
  • 57af42bbREADME: point to deploy.sh for the port listmre