BRAND_NAME = Code@Unbl.ink
RUN_USER   = git
RUN_MODE   = prod

[server]
EXTERNAL_URL                     = https://code.unbl.ink/
DOMAIN                           = code.unbl.ink
PROTOCOL                         = http
HTTP_ADDR                        = 0.0.0.0
HTTP_PORT                        = 3001
TLS_MIN_VERSION                  = TLS12
UNIX_SOCKET_PERMISSION           = 666
LOCAL_ROOT_URL                   = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/
OFFLINE_MODE                     = false
DISABLE_ROUTER_LOG               = true
ENABLE_GZIP                      = true
APP_DATA_PATH                    = data
LOAD_ASSETS_FROM_DISK            = false
LANDING_URL                      = /
DISABLE_SSH                      = false
SSH_DOMAIN                       = %(DOMAIN)s
SSH_PORT                         = 222
SSH_ROOT_PATH                    = 
SSH_KEYGEN_PATH                  = ssh-keygen
SSH_KEY_TEST_PATH                = 
MINIMUM_KEY_SIZE_CHECK           = false
REWRITE_AUTHORIZED_KEYS_AT_START = false
START_SSH_SERVER                 = false

[repository]
ROOT                        = /var/db/gogs/repositories
SCRIPT_TYPE                 = bash
ANSI_CHARSET                = 
FORCE_PRIVATE               = false
MAX_CREATION_LIMIT          = -1
PREFERRED_LICENSES          = Apache License 2.0, MIT License
DISABLE_HTTP_GIT            = false
ENABLE_LOCAL_PATH_MIGRATION = false
ENABLE_RAW_FILE_RENDER_MODE = false
COMMITS_FETCH_CONCURRENCY   = 0

[repository.editor]
LINE_WRAP_EXTENSIONS   = .txt,.md,.markdown,.mdown,.mkd
PREVIEWABLE_FILE_MODES = markdown

[repository.upload]
ENABLED       = true
TEMP_PATH     = data/tmp/uploads
ALLOWED_TYPES = 
FILE_MAX_SIZE = 3
MAX_FILES     = 5

[database]
DB_TYPE        = postgres
HOST           = db.service:5432
NAME           = gogs
USER           = gogs
PASSWORD       = {{gogs_db_pass}}
SSL_MODE       = disable

[security]
INSTALL_LOCK               = true
SECRET_KEY                 = {{gogs_secret_key}}
LOGIN_REMEMBER_DAYS        = 7
COOKIE_REMEMBER_NAME       = gogs_incredible
COOKIE_USERNAME            = gogs_awesome
COOKIE_SECURE              = false
ENABLE_LOGIN_STATUS_COOKIE = false
LOGIN_STATUS_COOKIE_NAME   = login_status

[email]
ENABLED            = true
SUBJECT_PREFIX     = [%(BRAND_NAME)s] 
HOST               = box.unbl.ink:587
FROM               = "Unblink Services" <services@unbl.ink>
USER               = services@unbl.ink
PASSWORD           = {{services_unblink_email_pass}}
ADD_PLAIN_TEXT_ALT = true

[auth]
ACTIVATE_CODE_LIVES                    = 180
RESET_PASSWORD_CODE_LIVES              = 180
REQUIRE_EMAIL_CONFIRMATION             = false
REQUIRE_SIGNIN_VIEW                    = false
DISABLE_REGISTRATION                   = true

[user]
ENABLE_EMAIL_NOTIFICATION = true

[session]
PROVIDER         = file
PROVIDER_CONFIG  = data/sessions
COOKIE_NAME      = i_like_gogs
COOKIE_SECURE    = false
GC_INTERVAL      = 3600
MAX_LIFE_TIME    = 86400
CSRF_COOKIE_NAME = _csrf

[cache]
ADAPTER  = memory
INTERVAL = 60

[http]
ACCESS_CONTROL_ALLOW_ORIGIN = 

[lfs]
STORAGE      = local
OBJECTS_PATH = data/lfs-objects

[attachment]
ENABLED       = true
PATH          = data/attachments
ALLOWED_TYPES = image/jpeg|image/png
MAX_SIZE      = 4
MAX_FILES     = 5

[release.attachment]
ENABLED       = true
ALLOWED_TYPES = */*
MAX_SIZE      = 32
MAX_FILES     = 10

[time]
FORMAT = RFC1123

[picture]
AVATAR_UPLOAD_PATH            = data/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars
GRAVATAR_SOURCE               = gravatar
DISABLE_GRAVATAR              = false
ENABLE_FEDERATED_AVATAR       = true

[markdown]
ENABLE_HARD_LINE_BREAK = false
CUSTOM_URL_SCHEMES     = 
FILE_EXTENSIONS        = .md,.markdown,.mdown,.mkd

[smartypants]
ENABLED       = false
FRACTIONS     = true
DASHES        = true
LATEX_DASHES  = true
ANGLED_QUOTES = true

[admin]
DISABLE_REGULAR_ORG_CREATION = false

[webhook]
TYPES           = gogs, slack, discord, dingtalk
DELIVER_TIMEOUT = 15
SKIP_TLS_VERIFY = false
PAGING_NUM      = 10

[log]
ROOT_PATH  = /var/log/gogs
MODE       = file
BUFFER_LEN = 100
LEVEL      = Info

[log.console]

[log.file]
LOG_ROTATE     = true
DAILY_ROTATE   = true
MAX_SIZE_SHIFT = 28
MAX_LINES      = 1000000
MAX_DAYS       = 7

[cron]
ENABLED      = true
RUN_AT_START = false

[cron.update_mirrors]
SCHEDULE = @every 60m

[cron.repo_health_check]
SCHEDULE = @every 24h
TIMEOUT  = 60s
ARGS     = 

[cron.check_repo_stats]
RUN_AT_START = true
SCHEDULE     = @every 24h

[cron.repo_archive_cleanup]
RUN_AT_START = false
SCHEDULE     = @every 24h
OLDER_THAN   = 24h

[git]
DISABLE_DIFF_HIGHLIGHT       = false
MAX_GIT_DIFF_FILES           = 100
MAX_GIT_DIFF_LINES           = 1000
MAX_GIT_DIFF_LINE_CHARACTERS = 2000
GC_ARGS                      = 

[git.timeout]
MIGRATE = 600
MIRROR  = 300
CLONE   = 300
PULL    = 300
GC      = 60

[mirror]
DEFAULT_INTERVAL = 8

[api]
MAX_RESPONSE_ITEMS = 50

[ui]
EXPLORE_PAGING_NUM    = 20
ISSUE_PAGING_NUM      = 10
FEED_MAX_COMMIT_NUM   = 5
THEME_COLOR_META_TAG  = `#ff5343`
MAX_DISPLAY_FILE_SIZE = 8388608

[ui.admin]
USER_PAGING_NUM   = 50
REPO_PAGING_NUM   = 50
NOTICE_PAGING_NUM = 25
ORG_PAGING_NUM    = 50

[ui.user]
REPO_PAGING_NUM      = 15
NEWS_FEED_PAGING_NUM = 20
COMMITS_PAGING_NUM   = 30

[prometheus]
; Whether to enable Prometheus metrics.
ENABLED             = true
; Whether to enable HTTP Basic Authentication to protect metrics data.
ENABLE_BASIC_AUTH   = false
; The username for HTTP Basic Authentication.
BASIC_AUTH_USERNAME = 
; The password for HTTP Basic Authentication.
BASIC_AUTH_PASSWORD = 

[highlight.mapping]

[i18n]
LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR,gl-ES,uk-UA,en-GB,hu-HU,sk-SK,id-ID,fa-IR,vi-VN,pt-PT
NAMES = English,简体中文,繁體中文（香港）,繁體中文（臺灣）,Deutsch,français,Nederlands,latviešu,русский,日本語,español,português do Brasil,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어,galego,українська,English (United Kingdom),Magyar,Slovenčina,Indonesian,Persian,Vietnamese,Português

; Used for datetimepicker
[i18n.datelang]
en-US = en
zh-CN = zh
zh-HK = zh-TW
zh-TW = zh-TW
de-DE = de
fr-FR = fr
nl-NL = nl
lv-LV = lv
ru-RU = ru
ja-JP = ja
es-ES = es
pt-BR = pt-BR
pl-PL = pl
bg-BG = bg
it-IT = it
fi-FI = fi
tr-TR = tr
cs-CZ = cs-CZ
sr-SP = sr
sv-SE = sv
ko-KR = ko
gl-ES = gl
uk-UA = uk
en-GB = en-GB
hu-HU = hu
sk-SK = sk
id-ID = id
fa-IR = fa
vi-VN = vi
pt-PT = pt

[other]
SHOW_FOOTER_BRANDING           = false
SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
