Skip to content

Commit b7b9a76

Browse files
committed
gitea: update configuration from upstream example file
- fixes /bin/sh: 1: Syntax error: ( unexpected on 'register the runner on the gitea instance' task- ref. go-gitea/gitea#28758
1 parent 2ec47af commit b7b9a76

File tree

1 file changed

+55
-25
lines changed

1 file changed

+55
-25
lines changed

roles/gitea/templates/etc_gitea_app.ini

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
;; Do not copy the whole file as-is, as it contains some invalid sections for illustrative purposes.
55
;; If you don't know what a setting is you should not set it.
66
;;
7-
;; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation.
7+
;; see https://docs.gitea.com/administration/config-cheat-sheet for additional documentation.
88

99

1010
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -463,6 +463,11 @@ PASSWORD_COMPLEXITY = {{ gitea_password_complexity }}
463463
;; Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations.
464464
;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security.
465465
;SUCCESSFUL_TOKENS_CACHE_SIZE = 20
466+
;;
467+
;; Reject API tokens sent in URL query string (Accept Header-based API tokens only). This avoids security vulnerabilities
468+
;; stemming from cached/logged plain-text API tokens.
469+
;; In future releases, this will become the default behavior
470+
;DISABLE_QUERY_AUTH_TOKEN = false
466471

467472
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
468473
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -516,6 +521,11 @@ JWT_SECRET = {{ gitea_oauth2_jwt_secret }}
516521
;;
517522
;; Maximum length of oauth2 token/cookie stored on server
518523
;MAX_TOKEN_LENGTH = 32767
524+
;;
525+
;; Pre-register OAuth2 applications for some universally useful services
526+
;; * https://github.com/hickford/git-credential-oauth
527+
;; * https://github.com/git-ecosystem/git-credential-manager
528+
;DEFAULT_APPLICATIONS = git-credential-oauth, git-credential-manager
519529

520530
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
521531
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -570,7 +580,7 @@ logger.router.MODE=
570580
;REQUEST_ID_HEADERS =
571581
;;
572582
;; Sets the template used to create the access log.
573-
;ACCESS_LOG_TEMPLATE = {% raw %}{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"{% endraw %}
583+
;ACCESS_LOG_TEMPLATE = {% raw %}{{.Ctx.RemoteHost}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"{% endraw %}
574584

575585
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
576586
;;
@@ -726,6 +736,8 @@ ENABLE_NOTIFY_MAIL = true
726736
;;
727737
;; More detail: https://github.com/gogits/gogs/issues/165
728738
;ENABLE_REVERSE_PROXY_AUTHENTICATION = false
739+
; Enable this to allow reverse proxy authentication for API requests, the reverse proxy is responsible for ensuring that no CSRF is possible.
740+
;ENABLE_REVERSE_PROXY_AUTHENTICATION_API = false
729741
;ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
730742
;ENABLE_REVERSE_PROXY_EMAIL = false
731743
;ENABLE_REVERSE_PROXY_FULL_NAME = false
@@ -799,6 +811,15 @@ DEFAULT_ALLOW_CREATE_ORGANIZATION = {{ gitea_default_allow_create_organization }
799811
;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.
800812
;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
801813
;;
814+
;; Default map service. No external API support has been included. A service has to allow
815+
;; searching using URL parameters, the location will be appended to the URL as escaped query parameter.
816+
;; Disabled by default, some example values are:
817+
;; - OpenStreetMap: https://www.openstreetmap.org/search?query=
818+
;; - Google Maps: https://www.google.com/maps/place/
819+
;; - MapQuest: https://www.mapquest.com/search/
820+
;; - Bing Maps: https://www.bing.com/maps?where1=
821+
; USER_LOCATION_MAP_URL =
822+
;;
802823
;; Enable heatmap on users profiles.
803824
;ENABLE_USER_HEATMAP = true
804825
;;
@@ -970,8 +991,8 @@ MAX_CREATION_LIMIT = {{ gitea_user_repo_limit }}
970991
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
971992
;ALLOWED_TYPES =
972993
;;
973-
;; Max size of each file in megabytes. Defaults to 3MB
974-
;FILE_MAX_SIZE = 3
994+
;; Max size of each file in megabytes. Defaults to 50MB
995+
;FILE_MAX_SIZE = 50
975996
;;
976997
;; Max number of files per upload. Defaults to 5
977998
;MAX_FILES = 5
@@ -1107,15 +1128,9 @@ MAX_CREATION_LIMIT = {{ gitea_user_repo_limit }}
11071128
;; enable cors headers (disabled by default)
11081129
;ENABLED = false
11091130
;;
1110-
;; scheme of allowed requests
1111-
;SCHEME = http
1112-
;;
1113-
;; list of requesting domains that are allowed
1131+
;; list of requesting origins that are allowed, eg: "https://*.example.com"
11141132
;ALLOW_DOMAIN = *
11151133
;;
1116-
;; allow subdomains of headers listed above to request
1117-
;ALLOW_SUBDOMAIN = false
1118-
;;
11191134
;; list of methods allowed to request
11201135
;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS
11211136
;;
@@ -1161,6 +1176,9 @@ ISSUE_PAGING_NUM = {{ gitea_issue_paging_num }}
11611176
;; Max size of files to be displayed (default is 8MiB)
11621177
;MAX_DISPLAY_FILE_SIZE = 8388608
11631178
;;
1179+
;; Detect ambiguous unicode characters in file contents and show warnings on the UI
1180+
;AMBIGUOUS_UNICODE_DETECTION = true
1181+
;;
11641182
;; Whether the email of the user should be shown in the Explore Users page
11651183
SHOW_USER_EMAIL = {{ gitea_show_user_email }}
11661184
;;
@@ -1172,9 +1190,12 @@ SHOW_USER_EMAIL = {{ gitea_show_user_email }}
11721190
;;
11731191
;; All available reactions users can choose on issues/prs and comments.
11741192
;; Values can be emoji alias (:smile:) or a unicode emoji.
1175-
;; For custom reactions, add a tightly cropped square image to public/img/emoji/reaction_name.png
1193+
;; For custom reactions, add a tightly cropped square image to public/assets/img/emoji/reaction_name.png
11761194
;REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes
11771195
;;
1196+
;; Change the number of users that are displayed in reactions tooltip (triggered by mouse hover).
1197+
;REACTION_MAX_USER_NUM = 10
1198+
;;
11781199
;; Additional Emojis not defined in the utf8 standard
11791200
;; By default we support gitea (:gitea:), to add more copy them to public/img/emoji/emoji_name.png and add it to this config.
11801201
;; Dont mistake it for Reactions.
@@ -1297,7 +1318,7 @@ SHOW_USER_EMAIL = {{ gitea_show_user_email }}
12971318
;; Define allowed algorithms and their minimum key length (use -1 to disable a type)
12981319
;ED25519 = 256
12991320
;ECDSA = 256
1300-
;RSA = 2047 ; we allow 2047 here because an otherwise valid 2048 bit RSA key can be reported as having 2047 bit length
1321+
;RSA = 3071 ; we allow 3071 here because an otherwise valid 3072 bit RSA key can be reported as having 3071 bit length
13011322
;DSA = -1 ; set to 1024 to switch on
13021323

13031324
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1315,10 +1336,10 @@ SHOW_USER_EMAIL = {{ gitea_show_user_email }}
13151336
;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve
13161337
;ISSUE_INDEXER_PATH = indexers/issues.bleve ; Relative paths will be made absolute against _`AppWorkPath`_.
13171338
;;
1318-
;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch or meilisearch
1319-
;ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200
1339+
;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch (e.g. http://elastic:password@localhost:9200) or meilisearch (e.g. http://:apikey@localhost:7700)
1340+
;ISSUE_INDEXER_CONN_STR =
13201341
;;
1321-
;; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch
1342+
;; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch or meilisearch.
13221343
;ISSUE_INDEXER_NAME = gitea_issues
13231344
;;
13241345
;; Timeout the indexer if it takes longer than this to start.
@@ -1380,7 +1401,7 @@ REPO_INDEXER_EXCLUDE = {{ gitea_repo_indexer_exclude|join(', ') }}
13801401
;DATADIR = queues/ ; Relative paths will be made absolute against `%(APP_DATA_PATH)s`.
13811402
;;
13821403
;; Default queue length before a channel queue will block
1383-
;LENGTH = 100
1404+
;LENGTH = 100000
13841405
;;
13851406
;; Batch size to send for batched queues
13861407
;BATCH_LENGTH = 20
@@ -1396,8 +1417,8 @@ REPO_INDEXER_EXCLUDE = {{ gitea_repo_indexer_exclude|join(', ') }}
13961417
;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
13971418
;SET_NAME = "_unique"
13981419
;;
1399-
;; Dynamically scale the worker pool to at this many workers
1400-
;MAX_WORKERS = 10
1420+
;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
1421+
;MAX_WORKERS = ; (dynamic)
14011422

14021423
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14031424
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1712,8 +1733,8 @@ PASSWD = {{ gitea_mail_password }}
17121733
;; Session cookie name
17131734
;COOKIE_NAME = i_like_gitea
17141735
;;
1715-
;; If you use session in https only, default is false
1716-
;COOKIE_SECURE = false
1736+
;; If you use session in https only: true or false. If not set, it defaults to `true` if the ROOT_URL is an HTTPS URL.
1737+
;COOKIE_SECURE =
17171738
;;
17181739
;; Session GC time interval in seconds, default is 86400 (1 day)
17191740
;GC_INTERVAL_TIME = 86400
@@ -1778,8 +1799,8 @@ DISABLE_GRAVATAR = {{ gitea_disable_gravatar }}
17781799
;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types.
17791800
;ALLOWED_TYPES = .csv,.docx,.fodg,.fodp,.fods,.fodt,.gif,.gz,.jpeg,.jpg,.log,.md,.mov,.mp4,.odf,.odg,.odp,.ods,.odt,.patch,.pdf,.png,.pptx,.svg,.tgz,.txt,.webm,.xls,.xlsx,.zip
17801801
;;
1781-
;; Max size of each file. Defaults to 4MB
1782-
;MAX_SIZE = 4
1802+
;; Max size of each file. Defaults to 2048MB
1803+
;MAX_SIZE = 2048
17831804
;;
17841805
;; Max number of files per upload. Defaults to 5
17851806
;MAX_FILES = 5
@@ -1792,8 +1813,9 @@ DISABLE_GRAVATAR = {{ gitea_disable_gravatar }}
17921813
;; Currently, only `minio` is supported.
17931814
;SERVE_DIRECT = false
17941815
;;
1795-
;; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local`
1796-
;PATH = data/attachments
1816+
;; Path for attachments. Defaults to `attachments`. Only available when STORAGE_TYPE is `local`
1817+
;; Relative paths will be resolved to `${AppDataPath}/${attachment.PATH}`
1818+
;PATH = attachments
17971819
;;
17981820
;; Minio endpoint to connect only available when STORAGE_TYPE is `minio`
17991821
;MINIO_ENDPOINT = localhost:9000
@@ -2532,6 +2554,14 @@ ENABLED = true
25322554
;;
25332555
;; Default platform to get action plugins, `github` for `https://github.com`, `self` for the current Gitea instance.
25342556
;DEFAULT_ACTIONS_URL = github
2557+
;; Default artifact retention time in days. Artifacts could have their own retention periods by setting the `retention-days` option in `actions/upload-artifact` step.
2558+
;ARTIFACT_RETENTION_DAYS = 90
2559+
;; Timeout to stop the task which have running status, but haven't been updated for a long time
2560+
;ZOMBIE_TASK_TIMEOUT = 10m
2561+
;; Timeout to stop the tasks which have running status and continuous updates, but don't end for a long time
2562+
;ENDLESS_TASK_TIMEOUT = 3h
2563+
;; Timeout to cancel the jobs which have waiting status, but haven't been picked by a runner for a long time
2564+
;ABANDONED_JOB_TIMEOUT = 24h
25352565

25362566
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25372567
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

0 commit comments

Comments
 (0)