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.

259 lines
7.0 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  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. ; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
  152. SESSION_ID_HASHFUNC = sha1
  153. ; Session hash key, default is use random string
  154. SESSION_ID_HASHKEY =
  155. [picture]
  156. ; The place to picture data, either "server" or "qiniu", default is "server"
  157. SERVICE = server
  158. DISABLE_GRAVATAR = false
  159. [attachment]
  160. ; Whether attachments are enabled. Defaults to `true`
  161. ENABLE = true
  162. ; Path for attachments. Defaults to `data/attachments`
  163. PATH = data/attachments
  164. ; One or more allowed types, e.g. image/jpeg|image/png
  165. ALLOWED_TYPES = image/jpeg|image/png
  166. ; Max size of each file. Defaults to 32MB
  167. MAX_SIZE = 32
  168. ; Max number of files per upload. Defaults to 10
  169. MAX_FILES = 10
  170. [time]
  171. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  172. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  173. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  174. FORMAT =
  175. [log]
  176. ROOT_PATH =
  177. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  178. ; Use comma to separate multiple modes, e.g. "console, file"
  179. MODE = console
  180. ; Buffer length of channel, keep it as it is if you don't know what it is.
  181. BUFFER_LEN = 10000
  182. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  183. LEVEL = Trace
  184. ; For "console" mode only
  185. [log.console]
  186. LEVEL =
  187. ; For "file" mode only
  188. [log.file]
  189. LEVEL =
  190. ; This enables automated log rotate(switch of following options), default is true
  191. LOG_ROTATE = true
  192. ; Max line number of single file, default is 1000000
  193. MAX_LINES = 1000000
  194. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  195. MAX_SIZE_SHIFT = 28
  196. ; Segment log daily, default is true
  197. DAILY_ROTATE = true
  198. ; Expired days of log file(delete after max days), default is 7
  199. MAX_DAYS = 7
  200. ; For "conn" mode only
  201. [log.conn]
  202. LEVEL =
  203. ; Reconnect host for every single message, default is false
  204. RECONNECT_ON_MSG = false
  205. ; Try to reconnect when connection is lost, default is false
  206. RECONNECT = false
  207. ; Either "tcp", "unix" or "udp", default is "tcp"
  208. PROTOCOL = tcp
  209. ; Host address
  210. ADDR =
  211. ; For "smtp" mode only
  212. [log.smtp]
  213. LEVEL =
  214. ; Name displayed in mail title, default is "Diagnostic message from serve"
  215. SUBJECT = Diagnostic message from serve
  216. ; Mail server
  217. HOST =
  218. ; Mailer user name and password
  219. USER =
  220. PASSWD =
  221. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  222. RECEIVERS =
  223. ; For "database" mode only
  224. [log.database]
  225. LEVEL =
  226. ; Either "mysql" or "postgres"
  227. DRIVER =
  228. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  229. CONN =
  230. [git]
  231. MAX_GITDIFF_LINES = 10000
  232. [i18n]
  233. LANGS = en-US,zh-CN,de-DE,fr-CA
  234. NAMES = English,简体中文,Deutsch,Français