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