Internals
This section describes some of the internals of the forge.
It is not intended for end users or even system administrators, but only for developers.
Architecture
The main forge daemon handles HTTP requests, SSH connections, incoming emails, IMAP access, the API, and just about anything that the user might want to access. It connects to the PostgreSQL database for most of its data, with the exception of Git repositories.
The git2d daemon is a separate process that handles all Git operations. Currently, the forge daemon automatically deploys and starts this daemon when it is started, and connects via UNIX domain sockets. Note that git2d is currently incomplete, so the forge daemon uses go-git for many operations.
Additionally, the main forge daemon currently launches instances of git-receivv-pack and git-upload-pack for Git network operations. This will be merged into git2d in the future.
In the future Git operations may be delegated to multiple nodes by using TCP instead of UNIX domain sockets and by ensuring all Git operations happen through git2d.
In the current architecture, git-receive-pack launches a pre-receive hook, hookc.