You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

app.ini 7.0KB

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