gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc90daf19c90daf19Re-vendor gitoria to Hybriel set-day37 (f6b3d45b)mrec90daf19/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

  • c90daf19Re-vendor gitoria to Hybriel set-day37 (f6b3d45b)mre
  • 03b5bb08W39 report to reports/, drop scratch repro, mission + logmre
  • 154d333fMerge w39-create-api: POST /api/repos with a user token (#39)mre
  • 149dd512Rewrite W39 reportmre
  • e5385075Expect 401 for POST /api/repos without a tokenmre
  • 1a76055cDocument repository creation APImre
  • 4d779b3bAdd create-api gatemre
  • 88563122Add POST /api/repos for user tokensmre
  • b00860e3Create repositories with member checks in createRepoInmre
  • 0a38f236Report repository creation API blockermre
  • b5f72187Record malformed JSON blocker for repository creationmre
  • a2ae8302logmre
  • 6947cd58logmre
  • 2175e48clogmre
  • 40eb3ca1gitoria#38: review package, logmre
  • 06a5a50egitoria#38: deploy b8252ca, logmre
  • b8252ca0gitoria#46: W46b report, logmre
  • 50093aafgitoria#46: statuses keyed by app + context (merge w46b-keyed)mre
  • dd0267edgitoria#46: fix a label in the keyed gatemre
  • b1dcb580gitoria#46: statuses keyed by app + context, required = app + context, old rows still readmre