app.ini 8.1 KB

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