app.ini 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. # NEVER EVER MODIFY THIS FILE
  2. # PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE
  3. ; App name that shows on every page title
  4. APP_NAME = Gogs: Go Git Service
  5. ; Change it if you run locally
  6. RUN_USER = git
  7. ; Either "dev", "prod" or "test", default is "dev"
  8. RUN_MODE = dev
  9. [repository]
  10. ROOT =
  11. SCRIPT_TYPE = bash
  12. [server]
  13. PROTOCOL = http
  14. DOMAIN = localhost
  15. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  16. HTTP_ADDR =
  17. HTTP_PORT = 3000
  18. ; Disable SSH feature when not available
  19. DISABLE_SSH = false
  20. SSH_PORT = 22
  21. ; Disable CDN even in "prod" mode
  22. OFFLINE_MODE = false
  23. DISABLE_ROUTER_LOG = false
  24. ; Generate steps:
  25. ; $ cd path/to/gogs/custom/https
  26. ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  27. ;
  28. ; Or from a .pfx file exported from the Windows certificate store (do
  29. ; not forget to export the private key):
  30. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  31. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  32. CERT_FILE = custom/https/cert.pem
  33. KEY_FILE = custom/https/key.pem
  34. ; Upper level of template and static file path
  35. ; default is the path where Gogs is executed
  36. STATIC_ROOT_PATH =
  37. ; Application level GZIP support
  38. ENABLE_GZIP = false
  39. ; Landing page for non-logged users, can be "home" or "explore"
  40. LANDING_PAGE = home
  41. [database]
  42. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  43. DB_TYPE = mysql
  44. HOST = 127.0.0.1:3306
  45. NAME = gogs
  46. USER = root
  47. PASSWD =
  48. ; For "postgres" only, either "disable", "require" or "verify-full"
  49. SSL_MODE = disable
  50. ; For "sqlite3" only
  51. PATH = data/gogs.db
  52. [admin]
  53. [security]
  54. INSTALL_LOCK = false
  55. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  56. SECRET_KEY = !#@FDEWREWR&*(
  57. ; Auto-login remember days
  58. LOGIN_REMEMBER_DAYS = 7
  59. COOKIE_USERNAME = gogs_awesome
  60. COOKIE_REMEMBER_NAME = gogs_incredible
  61. ; Reverse proxy authentication header name of user name
  62. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  63. [service]
  64. ACTIVE_CODE_LIVE_MINUTES = 180
  65. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  66. ; User need to confirm e-mail for registration
  67. REGISTER_EMAIL_CONFIRM = false
  68. ; Does not allow register and admin create account only
  69. DISABLE_REGISTRATION = false
  70. ; User must sign in to view anything.
  71. REQUIRE_SIGNIN_VIEW = false
  72. ; Cache avatar as picture
  73. ENABLE_CACHE_AVATAR = false
  74. ; Mail notification
  75. ENABLE_NOTIFY_MAIL = false
  76. ; More detail: https://github.com/gogits/gogs/issues/165
  77. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  78. ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false
  79. ; Do not check minimum key size with corresponding type
  80. DISABLE_MINIMUM_KEY_SIZE_CHECK = false
  81. [webhook]
  82. ; Cron task interval in minutes
  83. TASK_INTERVAL = 1
  84. ; Deliver timeout in seconds
  85. DELIVER_TIMEOUT = 5
  86. ; Allow insecure certification
  87. SKIP_TLS_VERIFY = false
  88. [mailer]
  89. ENABLED = false
  90. ; Buffer length of channel, keep it as it is if you don't know what it is.
  91. SEND_BUFFER_LEN = 10
  92. ; Name displayed in mail title
  93. SUBJECT = %(APP_NAME)s
  94. ; Mail server
  95. ; Gmail: smtp.gmail.com:587
  96. ; QQ: smtp.qq.com:25
  97. ; 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.
  98. HOST =
  99. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  100. SKIP_VERIFY =
  101. ; Use client certificate
  102. USE_CERTIFICATE = false
  103. CERT_FILE = custom/mailer/cert.pem
  104. KEY_FILE = custom/mailer/key.pem
  105. ; Mail from address, RFC 5322. This can be just an email address, or the "Name" <email@example.com> format
  106. FROM =
  107. ; Mailer user name and password
  108. USER =
  109. PASSWD =
  110. [oauth]
  111. ENABLED = false
  112. [oauth.github]
  113. ENABLED = false
  114. CLIENT_ID =
  115. CLIENT_SECRET =
  116. SCOPES = https://api.github.com/user
  117. AUTH_URL = https://github.com/login/oauth/authorize
  118. TOKEN_URL = https://github.com/login/oauth/access_token
  119. ; Get client id and secret from
  120. ; https://console.developers.google.com/project
  121. [oauth.google]
  122. ENABLED = false
  123. CLIENT_ID =
  124. CLIENT_SECRET =
  125. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  126. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  127. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  128. [oauth.qq]
  129. ENABLED = false
  130. CLIENT_ID =
  131. CLIENT_SECRET =
  132. SCOPES = get_user_info
  133. ; QQ 互联
  134. AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  135. TOKEN_URL = https://graph.qq.com/oauth2.0/token
  136. [oauth.weibo]
  137. ENABLED = false
  138. CLIENT_ID =
  139. CLIENT_SECRET =
  140. SCOPES = all
  141. AUTH_URL = https://api.weibo.com/oauth2/authorize
  142. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  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. ; The place to picture data, either "server" or "qiniu", default is "server"
  173. SERVICE = server
  174. AVATAR_UPLOAD_PATH = data/avatars
  175. ; Chinese users can choose "duoshuo"
  176. GRAVATAR_SOURCE = gravatar
  177. DISABLE_GRAVATAR = false
  178. [attachment]
  179. ; Whether attachments are enabled. Defaults to `true`
  180. ENABLE = true
  181. ; Path for attachments. Defaults to `data/attachments`
  182. PATH = data/attachments
  183. ; One or more allowed types, e.g. image/jpeg|image/png
  184. ALLOWED_TYPES = image/jpeg|image/png
  185. ; Max size of each file. Defaults to 32MB
  186. MAX_SIZE = 32
  187. ; Max number of files per upload. Defaults to 10
  188. MAX_FILES = 10
  189. [time]
  190. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  191. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  192. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  193. FORMAT =
  194. [log]
  195. ROOT_PATH =
  196. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  197. ; Use comma to separate multiple modes, e.g. "console, file"
  198. MODE = console
  199. ; Buffer length of channel, keep it as it is if you don't know what it is.
  200. BUFFER_LEN = 10000
  201. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  202. LEVEL = Trace
  203. ; For "console" mode only
  204. [log.console]
  205. LEVEL =
  206. ; For "file" mode only
  207. [log.file]
  208. LEVEL =
  209. ; This enables automated log rotate(switch of following options), default is true
  210. LOG_ROTATE = true
  211. ; Max line number of single file, default is 1000000
  212. MAX_LINES = 1000000
  213. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  214. MAX_SIZE_SHIFT = 28
  215. ; Segment log daily, default is true
  216. DAILY_ROTATE = true
  217. ; Expired days of log file(delete after max days), default is 7
  218. MAX_DAYS = 7
  219. ; For "conn" mode only
  220. [log.conn]
  221. LEVEL =
  222. ; Reconnect host for every single message, default is false
  223. RECONNECT_ON_MSG = false
  224. ; Try to reconnect when connection is lost, default is false
  225. RECONNECT = false
  226. ; Either "tcp", "unix" or "udp", default is "tcp"
  227. PROTOCOL = tcp
  228. ; Host address
  229. ADDR =
  230. ; For "smtp" mode only
  231. [log.smtp]
  232. LEVEL =
  233. ; Name displayed in mail title, default is "Diagnostic message from serve"
  234. SUBJECT = Diagnostic message from serve
  235. ; Mail server
  236. HOST =
  237. ; Mailer user name and password
  238. USER =
  239. PASSWD =
  240. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  241. RECEIVERS =
  242. ; For "database" mode only
  243. [log.database]
  244. LEVEL =
  245. ; Either "mysql" or "postgres"
  246. DRIVER =
  247. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  248. CONN =
  249. [git]
  250. MAX_GIT_DIFF_LINES = 10000
  251. ; Arguments for command 'git gc', e.g.: "--aggressive --auto"
  252. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  253. GC_ARGS =
  254. ; Git health check.
  255. [git.fsck]
  256. ENABLE = true
  257. ; Execution interval in hours. Default is 24.
  258. INTERVAL = 24
  259. ; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
  260. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  261. ARGS =
  262. [i18n]
  263. LANGS = en-US,zh-CN,zh-HK,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,ja-JP,es-ES,pt-BR,pl-PL
  264. NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本语,Español,Português,Polski
  265. [other]
  266. SHOW_FOOTER_BRANDING = false