app.ini.j2 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. ; App name that shows on every page title
  2. APP_NAME = {{ gogs_cfg_app_name }}
  3. ; Change it if you run locally
  4. RUN_USER = {{ gogs_user }}
  5. ; Either "dev", "prod" or "test", default is "dev"
  6. RUN_MODE = {{ gogs_cfg_mode }}
  7. [repository]
  8. ROOT = {{ gogs_repo_dir }}
  9. ; Force every new repository to be private
  10. FORCE_PRIVATE = false
  11. ; Global maximum creation limit of repositories per user, -1 means no limit.
  12. MAX_CREATION_LIMIT = -1
  13. [ui]
  14. ; Number of repositories that are showed in one explore page
  15. EXPLORE_PAGING_NUM = 50
  16. ; Number of issues that are showed in one page
  17. ISSUE_PAGING_NUM = 25
  18. [markdown]
  19. ; Enable hard line break extension
  20. ENABLE_HARD_LINE_BREAK = {{ gogs_markdown_hard_line_break }}
  21. [server]
  22. PROTOCOL = {{ gogs_protocol }}
  23. DOMAIN = {{ gogs_domain }}
  24. ROOT_URL = https://{{ gogs_domain }}
  25. HTTP_ADDR = 127.0.0.1
  26. HTTP_PORT = {{ gogs_port }}
  27. ; Local (DMZ) URL for Gogs workers (such as SSH update) accessing web service.
  28. ; In most cases you do not need to change the default value.
  29. ; Alter it only if your SSH server node is not the same as HTTP node.
  30. LOCAL_ROOT_URL = http://localhost:%(HTTP_PORT)s/
  31. ; Disables use of CDN for static files and Gravatar for profile pictures.
  32. OFFLINE_MODE = {{ gogs_cfg_offline_mode }}
  33. ; Disable SSH feature when not available
  34. DISABLE_SSH = false
  35. ; Whether use builtin SSH server or not.
  36. START_SSH_SERVER = false
  37. ; Domain name to be exposed in clone URL
  38. SSH_DOMAIN = %(DOMAIN)s
  39. ; Port number to be exposed in clone URL
  40. SSH_PORT = 22
  41. ; Port number builtin SSH server listens on
  42. SSH_LISTEN_PORT = %(SSH_PORT)s
  43. ; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'.
  44. SSH_ROOT_PATH =
  45. ; Directory to create temporary files when test publick key using ssh-keygen,
  46. ; default is system temporary directory.
  47. SSH_KEY_TEST_PATH =
  48. ; Path to ssh-keygen, default is 'ssh-keygen' and let shell find out which one to call.
  49. SSH_KEYGEN_PATH = ssh-keygen
  50. ; Indicate whether to check minimum key size with corresponding type
  51. MINIMUM_KEY_SIZE_CHECK = false
  52. DISABLE_ROUTER_LOG = false
  53. ; Generate steps:
  54. ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  55. ;
  56. ; Or from a .pfx file exported from the Windows certificate store (do
  57. ; not forget to export the private key):
  58. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  59. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  60. ; CERT_FILE =
  61. ; KEY_FILE =
  62. ; Upper level of template and static file path
  63. ; default is the path where Gogs is executed
  64. STATIC_ROOT_PATH =
  65. ; Default path for App data
  66. APP_DATA_PATH = data
  67. ; Application level GZIP support
  68. ENABLE_GZIP = false
  69. ; Landing page for non-logged users, can be "home" or "explore"
  70. LANDING_PAGE = home
  71. [database]
  72. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  73. DB_TYPE = sqlite3
  74. ; HOST = 127.0.0.1:5432
  75. ; NAME =
  76. ; USER =
  77. ; PASSWD = ``
  78. ; For "postgres" only, either "disable", "require" or "verify-full"
  79. ; SSL_MODE = disable
  80. PATH = {{ gogs_sqlite_path }}
  81. [admin]
  82. [security]
  83. INSTALL_LOCK = true
  84. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  85. SECRET_KEY = {{ gogs_cfg_secret_key }}
  86. ; Auto-login remember days
  87. LOGIN_REMEMBER_DAYS = 7
  88. COOKIE_USERNAME = gogs_awesome
  89. COOKIE_REMEMBER_NAME = gogs_incredible
  90. ; Reverse proxy authentication header name of user name
  91. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  92. [service]
  93. ACTIVE_CODE_LIVE_MINUTES = 180
  94. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  95. ; User need to confirm e-mail for registration
  96. REGISTER_EMAIL_CONFIRM = false
  97. ; Does not allow register and admin create account only
  98. DISABLE_REGISTRATION = true
  99. ; User must sign in to view anything.
  100. REQUIRE_SIGNIN_VIEW = false
  101. ; Mail notification
  102. ENABLE_NOTIFY_MAIL = false
  103. ; More detail: https://github.com/gogits/gogs/issues/165
  104. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  105. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  106. ; Enable captcha validation for registration
  107. ENABLE_CAPTCHA = true
  108. [webhook]
  109. ; Hook task queue length
  110. QUEUE_LENGTH = 1000
  111. ; Deliver timeout in seconds
  112. DELIVER_TIMEOUT = 5
  113. ; Allow insecure certification
  114. SKIP_TLS_VERIFY = false
  115. ; Number of history information in each page
  116. PAGING_NUM = 10
  117. [mailer]
  118. ENABLED = false
  119. ; Buffer length of channel, keep it as it is if you don't know what it is.
  120. SEND_BUFFER_LEN = 100
  121. ; Name displayed in mail title
  122. SUBJECT = %(APP_NAME)s
  123. ; Mail server
  124. ; Gmail: smtp.gmail.com:587
  125. ; QQ: smtp.qq.com:25
  126. ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
  127. HOST =
  128. ; Disable HELO operation when hostname are different.
  129. DISABLE_HELO =
  130. ; Custom hostname for HELO operation, default is from system.
  131. HELO_HOSTNAME =
  132. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  133. SKIP_VERIFY =
  134. ; Use client certificate
  135. USE_CERTIFICATE = false
  136. CERT_FILE = custom/mailer/cert.pem
  137. KEY_FILE = custom/mailer/key.pem
  138. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  139. FROM =
  140. ; Mailer user name and password
  141. USER =
  142. PASSWD =
  143. [cache]
  144. ; Either "memory", "redis", or "memcache", default is "memory"
  145. ADAPTER = memory
  146. ; For "memory" only, GC interval in seconds, default is 60
  147. INTERVAL = 60
  148. ; For "redis" and "memcache", connection host address
  149. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  150. ; memcache: `127.0.0.1:11211`
  151. HOST =
  152. [session]
  153. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  154. PROVIDER = memory
  155. ; Provider config options
  156. ; memory: not have any config yet
  157. ; file: session file path, e.g. `data/sessions`
  158. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  159. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  160. PROVIDER_CONFIG = data/sessions
  161. ; Session cookie name
  162. COOKIE_NAME = i_like_gogits
  163. ; If you use session in https only, default is false
  164. COOKIE_SECURE = false
  165. ; Enable set cookie, default is true
  166. ENABLE_SET_COOKIE = true
  167. ; Session GC time interval, default is 86400
  168. GC_INTERVAL_TIME = 86400
  169. ; Session life time, default is 86400
  170. SESSION_LIFE_TIME = 86400
  171. [picture]
  172. AVATAR_UPLOAD_PATH = data/avatars
  173. ; Chinese users can choose "duoshuo"
  174. ; or a custom avatar source, like: http://cn.gravatar.com/avatar/
  175. GRAVATAR_SOURCE = gravatar
  176. DISABLE_GRAVATAR = false
  177. [attachment]
  178. ; Whether attachments are enabled. Defaults to `true`
  179. ENABLE = true
  180. ; Path for attachments. Defaults to `data/attachments`
  181. PATH = data/attachments
  182. ; One or more allowed types, e.g. image/jpeg|image/png
  183. ALLOWED_TYPES = image/jpeg|image/png
  184. ; Max size of each file. Defaults to 32MB
  185. MAX_SIZE = 4
  186. ; Max number of files per upload. Defaults to 10
  187. MAX_FILES = 5
  188. [time]
  189. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  190. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  191. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  192. FORMAT =
  193. [log]
  194. ROOT_PATH =
  195. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  196. ; Use comma to separate multiple modes, e.g. "console, file"
  197. MODE = console
  198. ; Buffer length of channel, keep it as it is if you don't know what it is.
  199. BUFFER_LEN = 10000
  200. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  201. LEVEL = Trace
  202. ; For "console" mode only
  203. [log.console]
  204. LEVEL =
  205. ; For "file" mode only
  206. [log.file]
  207. LEVEL =
  208. ; This enables automated log rotate(switch of following options), default is true
  209. LOG_ROTATE = true
  210. ; Max line number of single file, default is 1000000
  211. MAX_LINES = 1000000
  212. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  213. MAX_SIZE_SHIFT = 28
  214. ; Segment log daily, default is true
  215. DAILY_ROTATE = true
  216. ; Expired days of log file(delete after max days), default is 7
  217. MAX_DAYS = 7
  218. ; For "conn" mode only
  219. [log.conn]
  220. LEVEL =
  221. ; Reconnect host for every single message, default is false
  222. RECONNECT_ON_MSG = false
  223. ; Try to reconnect when connection is lost, default is false
  224. RECONNECT = false
  225. ; Either "tcp", "unix" or "udp", default is "tcp"
  226. PROTOCOL = tcp
  227. ; Host address
  228. ADDR =
  229. ; For "smtp" mode only
  230. [log.smtp]
  231. LEVEL =
  232. ; Name displayed in mail title, default is "Diagnostic message from server"
  233. SUBJECT = Diagnostic message from server
  234. ; Mail server
  235. HOST =
  236. ; Mailer user name and password
  237. USER =
  238. PASSWD =
  239. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  240. RECEIVERS =
  241. ; For "database" mode only
  242. [log.database]
  243. LEVEL =
  244. ; Either "mysql" or "postgres"
  245. DRIVER =
  246. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  247. CONN =
  248. [cron]
  249. ; Enable running cron tasks periodically.
  250. ENABLED = true
  251. ; Run cron tasks when Gogs starts.
  252. RUN_AT_START = false
  253. ; Update mirrors
  254. [cron.update_mirrors]
  255. SCHEDULE = @every 1h
  256. ; Repository health check
  257. [cron.repo_health_check]
  258. SCHEDULE = @every 24h
  259. TIMEOUT = 60s
  260. ; Arguments for command 'git fsck', e.g. "--unreachable --tags"
  261. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  262. ARGS =
  263. ; Check repository statistics
  264. [cron.check_repo_stats]
  265. RUN_AT_START = true
  266. SCHEDULE = @every 24h
  267. [other]
  268. SHOW_FOOTER_BRANDING = false
  269. ; Show version information about gogs and go in the footer
  270. SHOW_FOOTER_VERSION = true