Documentation
¶
Overview ¶
Package caddygitea is a Caddy plugin that runs Gitea, the version control server, INSIDE Caddy: the needed parts of Gitea's source are in this repository (gitea/), copied from upstream Gitea with wekan/gitea-patches and this repository's patches applied (releases/sync-gitea.sh), so one Caddy binary serves Gitea itself.
- the app "gitea" starts Gitea in Caddy's process, from its app.ini;
- the handler "gitea" (http.handlers.gitea) serves a site from it - no proxy, no second process, no port of its own.
Caddyfile:
{
gitea {
work_path /var/lib/gitea
}
}
git.example.org {
gitea
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// WorkPath is Gitea's WORK_PATH: repositories, data and custom/ are below it.
WorkPath string `json:"work_path,omitempty"`
// CustomPath is Gitea's custom directory. Default: <work_path>/custom.
CustomPath string `json:"custom_path,omitempty"`
// Config is Gitea's app.ini. Default: <custom_path>/conf/app.ini.
Config string `json:"config,omitempty"`
// StopTimeout is how long Gitea gets to finish its work when Caddy exits.
// Default 30s.
StopTimeout caddy.Duration `json:"stop_timeout,omitempty"`
// contains filtered or unexported fields
}
App runs Gitea inside Caddy.
func (App) CaddyModule ¶
func (App) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*App) Start ¶
Start starts Gitea in the background: Caddy does not wait for its database migrations; the handler answers 503 until Gitea is ready.
type Handler ¶
type Handler struct{}
Handler serves a site from the Gitea running in Caddy.
func (Handler) CaddyModule ¶
func (Handler) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
Directories
¶
| Path | Synopsis |
|---|---|
|
gitea
|
|
|
modules/citation
Package citation formats CITATION.cff files, ported from the formatters of ruby-cff 1.3.0
|
Package citation formats CITATION.cff files, ported from the formatters of ruby-cff 1.3.0 |
|
modules/log
Package log provides logging capabilities for Gitea.
|
Package log provides logging capabilities for Gitea. |
|
modules/queue
Package queue implements a specialized concurrent queue system for Gitea.
|
Package queue implements a specialized concurrent queue system for Gitea. |
|
modules/web/binding
Package binding binds form, multipart and JSON request data to structs and validates them by their "binding" tags.
|
Package binding binds form, multipart and JSON request data to structs and validates them by their "binding" tags. |
|
modules/zstd
Package zstd provides a high-level API for reading and writing zstd-compressed data.
|
Package zstd provides a high-level API for reading and writing zstd-compressed data. |
|
routers/api/v1
Package v1 Gitea API
|
Package v1 Gitea API |
|
routers/private
Package private contains all internal routes.
|
Package private contains all internal routes. |
|
services/notifications
Package notifications wraps activities_model notification-status mutations with the matching real-time push, so route handlers cannot forget either side.
|
Package notifications wraps activities_model notification-status mutations with the matching real-time push, so route handlers cannot forget either side. |
|
services/pubsub
Package pubsub fans real-time events out to local WebSocket subscribers.
|
Package pubsub fans real-time events out to local WebSocket subscribers. |
|
Package proxy sends HTTP requests to a supervised child process with Caddy's own reverse proxy - WebSockets, streaming and the X-Forwarded-* headers included - and answers 503 with Retry-After while the child is not accepting connections yet, so a client sees "starting" rather than a gateway error.
|
Package proxy sends HTTP requests to a supervised child process with Caddy's own reverse proxy - WebSockets, streaming and the X-Forwarded-* headers included - and answers 503 with Retry-After while the child is not accepting connections yet, so a client sees "starting" rather than a gateway error. |
|
Package supervisor runs one program as a child process of Caddy: it starts it, restarts it when it exits on its own, knows when it accepts connections, and stops it - and every process it started - when Caddy stops.
|
Package supervisor runs one program as a child process of Caddy: it starts it, restarts it when it exits on its own, knows when it accepts connections, and stops it - and every process it started - when Caddy stops. |