fix: make default server config example valid

Included some comments to help configure the file.

Closes kemitix/git-next#115
This commit is contained in:
Paul Campbell 2024-07-29 08:16:16 +01:00
parent e56d6a3ebb
commit b7abe949e2

View file

@ -1,25 +1,26 @@
[http] [http] # where to listen for incoming updates from forges
addr = "0.0.0.0" addr = "0.0.0.0"
port = 8080 port = 8080
[webhook] [webhook] # where forge should send updates to - should be route to 'http.addr:http.port' above (e.g. using a reverse proxy)
url = "https://localhost:8080" # don't include any query path or a trailing slash url = "https://localhost:8080" # don't include any query path or a trailing slash
[storage] [notification] # where updates from git-next should be sent to alert the user
type = "None"
# type = "Webhook"
# webhook = { url = "https//localhost:9090", secret = "secret-password" }
[storage] # where local copies of repositories will be cloned (bare) into
path = "./data" path = "./data"
[notifications] [forge] # the forges to connect to
type = "WebHook"
webhook = { url = "https://localhost:9090" }
[forge] # [forge.default]
# forge_type = "ForgeJo"
[forge.default] # hostname = "git.example.net"
forge_type = "ForgeJo" # user = "bob" # the user to perform actions as
hostname = "git.example.net" # token = "API-Token"
user = "git-next" # the user to perform actions as #
token = "API-Token" # [forge.default.repos] # the repos at the forge to manage
# hello = { repo = "bob/hello", branch = "main", gitdir = "/opt/git/projects/bob/hello.git" }
[forge.default.repos] # world = { repo = "bob/world", branch = "master", main = "master", next = "upcoming", "dev" = "develop" }
hello = { repo = "user/hello", branch = "main", gitdir = "/opt/git/projects/user/hello.git" } # maps to https://git.example.net/user/hello on the branch 'main'
world = { repo = "user/world", branch = "master", main = "master", next = "upcoming", "dev" = "develop" } # maps to the 'master' branch