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.

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