forge
Explore
Log in

Don't you dare go Hollow

forge

Clone
★ 0

0 watching0 forksRustAGPL-3.08.8 MiB197fa34Tahinli1 month ago68 commits

forge.example.toml187 lines, 8.1 KiBHistoryRawDownload
1# forge example configuration. Copy to forge.toml and adjust.
2# Development defaults; production values belong in /etc/forge/forge.toml.
3
4# SQLite/Turso database file.
5database = "./data/forge.db"
6# Root for repos, instance key, gitconfig, hooks and sockets.
7data_dir = "./data"
8# HTTP listen address for the web UI and smart-HTTP.
9listen = "127.0.0.1:7660"
10# Public base URL used in links and clone URLs.
11base_url = "http://127.0.0.1:7660"
12# Separate origin for raw user content (Milestone 2).
13user_content_base_url = "http://127.0.0.1:7661"
14# Listener for raw user files. It is served on a separate origin, so in production
15# user_content_base_url should use a separate registrable domain (not a subdomain of
16# base_url), which keeps user-uploaded content from running with the main site's cookies.
17user_content_listen = "127.0.0.1:7661"
18# SSH listen address for git over SSH.
19ssh_listen = "0.0.0.0:2222"
20# Host and port shown in SSH clone URLs.
21ssh_public_host = "127.0.0.1"
22ssh_public_port = 2222
23# Self-registration: "closed" | "invite" | "open".
24registration = "closed"
25# Proxies whose X-Forwarded-For is trusted for client IPs (login and git throttling). Addresses or CIDRs.
26# Set to ["127.0.0.1"] when running behind a local reverse proxy. Empty: the TCP peer is the client.
27trusted_proxies = []
28
29# Outbound webhooks. Internal destinations (loopback, private, link-local, CGNAT, ...) are refused.
30# [webhooks]
31# Allow http:// hook URLs (https only by default).
32# allow_http = false
33# Exact hostnames or CIDR networks that may be reached even if they resolve to internal addresses.
34# allowed_hosts = ["hooks.internal.example", "10.20.0.0/16"]
35
36# Scheduled backups (see docs/backup.md). Empty dir disables the scheduler.
37# [backup]
38# Directory that receives the backup sets. Ship it off-site with restic or rclone.
39# dir = "/var/backups/forge"
40# Hours between full backup sets.
41# interval_hours = 24
42# Newest complete sets kept in dir. Older complete sets are deleted after a good run.
43# keep = 7
44# Optional healthchecks.io style URL: pinged with /start, then the URL on success or /fail on error.
45# The URL may hold a token, so the admin page shows only its host.
46# healthcheck_url = ""
47# Days between git fsck of every repo and the database integrity check.
48# fsck_interval_days = 7
49
50# Release settings.
51# [releases]
52# Largest accepted release asset, in MiB.
53# max_asset_mb = 512
54
55# Where release assets and CI artifacts are stored (see docs/backup.md, "Blob storage backends").
56# [storage]
57# "fs" keeps blobs under <data_dir>/blobs (the default). "r2" stores them in a Cloudflare R2 bucket,
58# the recommended off-host option. "s3" stores them in any other S3-compatible bucket (AWS, MinIO, Garage).
59# backend = "fs"
60# [storage.r2]
61# Only read when backend = "r2". account_id, bucket, access_key_id and secret_access_key_file are required.
62# The endpoint is derived from account_id, so there is no endpoint or region to set.
63# Cloudflare account id, the 32-character hex string from the dashboard.
64# account_id = "0123456789abcdef0123456789abcdef"
65# Name of the R2 bucket that holds the blobs.
66# bucket = "forge-blobs"
67# Jurisdiction the bucket was created in: "eu", "fedramp", or empty for the global default.
68# jurisdiction = ""
69# Key prefix inside the bucket. Empty stores keys at the bucket root.
70# prefix = ""
71# Access key id of an R2 API token with object read and write on this bucket.
72# access_key_id = "forge"
73# File holding the token's secret access key, mode 0600. Its contents are trimmed.
74# secret_access_key_file = "/etc/forge/r2-secret"
75# [storage.s3]
76# Only read when backend = "s3". Bucket, region, access_key_id and secret_access_key_file are required.
77# Name of the bucket that holds the blobs.
78# bucket = "forge-blobs"
79# Signing region, such as "eu-central-1". MinIO and Garage accept any value.
80# region = "us-east-1"
81# Full URL of a non-AWS endpoint. Empty uses AWS.
82# endpoint = "https://minio.internal:9000"
83# Key prefix inside the bucket. Empty stores keys at the bucket root.
84# prefix = ""
85# Access key id.
86# access_key_id = "forge"
87# File holding the secret access key, mode 0600. Its contents are trimmed.
88# secret_access_key_file = "/etc/forge/s3-secret"
89# Permit an http:// endpoint. Only for a store on a trusted private network.
90# allow_http = false
91# Use bucket.host addressing instead of host/bucket. Off suits MinIO, Garage and most self-hosted stores.
92# virtual_hosted_style = false
93
94# Standby replication (see docs/backup.md). Empty target disables it. When target is set,
95# identity_file and known_hosts_file are required.
96# [replication]
97# [user@]host:/absolute/base of the standby account. Empty disables replication.
98# target = ""
99# SSH port of the standby host.
100# ssh_port = 22
101# Private key of the standby account (mode 0600). Required when target is set.
102# identity_file = ""
103# Pinned host keys of the standby. Required when target is set. StrictHostKeyChecking is always yes.
104# known_hosts_file = ""
105# Minutes between database snapshots shipped to the standby. Must be at least 1.
106# db_snapshot_minutes = 15
107# Minutes between reconcile passes (refs checksums, deleted repos, healthcheck). Must be at least 1.
108# reconcile_minutes = 60
109# Optional URL pinged after each reconcile pass. Empty disables it.
110# healthcheck_url = ""
111
112# Git LFS limits.
113# [lfs]
114# Largest accepted LFS object, in MiB.
115# max_object_mb = 2048
116
117# CI limits and retention.
118# [ci]
119# Whether CI runs at all. When false, pushes and pull requests create no runs.
120# enabled = true
121# Largest job log, in MiB. Past it the log is truncated.
122# max_log_mb = 16
123# Largest artifact, in MiB.
124# max_artifact_mb = 512
125# Artifacts a single job may upload.
126# max_artifacts_per_job = 50
127# Days a job log is kept.
128# log_retention_days = 90
129# Days an artifact is kept.
130# artifact_retention_days = 30
131# Hours a runner registration token stays valid.
132# registration_token_hours = 24
133
134# Security advisories (opt-in). When enabled, the forge downloads the OSV dumps for ecosystems and scans each repo's lockfiles.
135# [advisories]
136# Whether the advisory download and the lockfile scans run at all.
137# enabled = false
138# OSV ecosystems to download and scan: any of "crates.io", "npm", "Go".
139# ecosystems = ["crates.io", "npm", "Go"]
140# Hours before a downloaded dump is fetched again.
141# refresh_hours = 24
142
143# Outgoing mail transport. The SMTP server, sender and password are set on /admin/mail and stored in the database.
144# [mail]
145# smtp sends through the configured server. log writes each message to <data_dir>/mail-log/ instead, for development and tests.
146# transport = "smtp"
147
148# Organization rules.
149# [orgs]
150# Who may create organizations: "all" (any signed-in person) or "admin" (instance admins only).
151# creation = "all"
152
153# Self-update (off by default). When enabled, a successful push run of `repo` on `branch` replaces
154# the running binary with the artifact of `job` and restarts. Run under systemd with Restart=on-failure,
155# because the process exits with code 75 after the swap. A sha256 listed in `<exe>.bad` is never installed.
156# [self_update]
157# Whether a green run deploys its artifact.
158# enabled = false
159# The repo whose runs deploy, as owner/name.
160# repo = "Tahinli/forge"
161# The branch whose push runs deploy.
162# branch = "main"
163# The CI job that produces the artifact.
164# job = "build"
165# The artifact name produced by job. A single file. CI flattens paths, so dist/forge is stored as dist_forge.
166# artifact = "dist_forge"
167
168# Admin alerts. The site admins hear about trouble before it breaks: a silent CI runner, a failed
169# or overdue backup, low disk space, a CI job killed for memory, a self-update, a lagging standby.
170# Each is told once until it resolves. Delivered as an inbox row, an email, and a banner on /admin/health.
171# All of these can also be changed live on /admin/server.
172# [alerts]
173# enabled = true
174# Also email admins with a verified address.
175# email = true
176# Minutes without a heartbeat before a runner counts as offline.
177# runner_offline_minutes = 10
178# Alert under this percent of free space in data_dir, or under disk_free_gib GiB (0 turns that off).
179# disk_free_percent = 10
180# disk_free_gib = 0
181# Per-kind switches.
182# on_runner_offline = true
183# on_backup = true
184# on_disk = true
185# on_ci_killed = true
186# on_self_update = true
187# on_replication = true