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.

298 lines
8.7 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
9 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
9 years ago
  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. ; Disable HELO operation when hostname are different.
  100. DISABLE_HELO =
  101. ; Custom hostname for HELO operation, default is from system.
  102. HELO_HOSTNAME =
  103. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  104. SKIP_VERIFY =
  105. ; Use client certificate
  106. USE_CERTIFICATE = false
  107. CERT_FILE = custom/mailer/cert.pem
  108. KEY_FILE = custom/mailer/key.pem
  109. ; Mail from address, RFC 5322. This can be just an email address, or the "Name" <email@example.com> format
  110. FROM =
  111. ; Mailer user name and password
  112. USER =
  113. PASSWD =
  114. [oauth]
  115. ENABLED = false
  116. [oauth.github]
  117. ENABLED = false
  118. CLIENT_ID =
  119. CLIENT_SECRET =
  120. SCOPES = https://api.github.com/user
  121. AUTH_URL = https://github.com/login/oauth/authorize
  122. TOKEN_URL = https://github.com/login/oauth/access_token
  123. ; Get client id and secret from
  124. ; https://console.developers.google.com/project
  125. [oauth.google]
  126. ENABLED = false
  127. CLIENT_ID =
  128. CLIENT_SECRET =
  129. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  130. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  131. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  132. [oauth.qq]
  133. ENABLED = false
  134. CLIENT_ID =
  135. CLIENT_SECRET =
  136. SCOPES = get_user_info
  137. ; QQ 互联
  138. AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  139. TOKEN_URL = https://graph.qq.com/oauth2.0/token
  140. [oauth.weibo]
  141. ENABLED = false
  142. CLIENT_ID =
  143. CLIENT_SECRET =
  144. SCOPES = all
  145. AUTH_URL = https://api.weibo.com/oauth2/authorize
  146. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  147. [cache]
  148. ; Either "memory", "redis", or "memcache", default is "memory"
  149. ADAPTER = memory
  150. ; For "memory" only, GC interval in seconds, default is 60
  151. INTERVAL = 60
  152. ; For "redis" and "memcache", connection host address
  153. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  154. ; memcache: `127.0.0.1:11211`
  155. HOST =
  156. [session]
  157. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  158. PROVIDER = memory
  159. ; Provider config options
  160. ; memory: not have any config yet
  161. ; file: session file path, e.g. `data/sessions`
  162. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  163. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  164. PROVIDER_CONFIG = data/sessions
  165. ; Session cookie name
  166. COOKIE_NAME = i_like_gogits
  167. ; If you use session in https only, default is false
  168. COOKIE_SECURE = false
  169. ; Enable set cookie, default is true
  170. ENABLE_SET_COOKIE = true
  171. ; Session GC time interval, default is 86400
  172. GC_INTERVAL_TIME = 86400
  173. ; Session life time, default is 86400
  174. SESSION_LIFE_TIME = 86400
  175. [picture]
  176. ; The place to picture data, either "server" or "qiniu", default is "server"
  177. SERVICE = server
  178. AVATAR_UPLOAD_PATH = data/avatars
  179. ; Chinese users can choose "duoshuo"
  180. GRAVATAR_SOURCE = gravatar
  181. DISABLE_GRAVATAR = false
  182. [attachment]
  183. ; Whether attachments are enabled. Defaults to `true`
  184. ENABLE = true
  185. ; Path for attachments. Defaults to `data/attachments`
  186. PATH = data/attachments
  187. ; One or more allowed types, e.g. image/jpeg|image/png
  188. ALLOWED_TYPES = image/jpeg|image/png
  189. ; Max size of each file. Defaults to 32MB
  190. MAX_SIZE = 32
  191. ; Max number of files per upload. Defaults to 10
  192. MAX_FILES = 10
  193. [time]
  194. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  195. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  196. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  197. FORMAT =
  198. [log]
  199. ROOT_PATH =
  200. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  201. ; Use comma to separate multiple modes, e.g. "console, file"
  202. MODE = console
  203. ; Buffer length of channel, keep it as it is if you don't know what it is.
  204. BUFFER_LEN = 10000
  205. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  206. LEVEL = Trace
  207. ; For "console" mode only
  208. [log.console]
  209. LEVEL =
  210. ; For "file" mode only
  211. [log.file]
  212. LEVEL =
  213. ; This enables automated log rotate(switch of following options), default is true
  214. LOG_ROTATE = true
  215. ; Max line number of single file, default is 1000000
  216. MAX_LINES = 1000000
  217. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  218. MAX_SIZE_SHIFT = 28
  219. ; Segment log daily, default is true
  220. DAILY_ROTATE = true
  221. ; Expired days of log file(delete after max days), default is 7
  222. MAX_DAYS = 7
  223. ; For "conn" mode only
  224. [log.conn]
  225. LEVEL =
  226. ; Reconnect host for every single message, default is false
  227. RECONNECT_ON_MSG = false
  228. ; Try to reconnect when connection is lost, default is false
  229. RECONNECT = false
  230. ; Either "tcp", "unix" or "udp", default is "tcp"
  231. PROTOCOL = tcp
  232. ; Host address
  233. ADDR =
  234. ; For "smtp" mode only
  235. [log.smtp]
  236. LEVEL =
  237. ; Name displayed in mail title, default is "Diagnostic message from serve"
  238. SUBJECT = Diagnostic message from serve
  239. ; Mail server
  240. HOST =
  241. ; Mailer user name and password
  242. USER =
  243. PASSWD =
  244. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  245. RECEIVERS =
  246. ; For "database" mode only
  247. [log.database]
  248. LEVEL =
  249. ; Either "mysql" or "postgres"
  250. DRIVER =
  251. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  252. CONN =
  253. [git]
  254. MAX_GIT_DIFF_LINES = 10000
  255. ; Arguments for command 'git gc', e.g.: "--aggressive --auto"
  256. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  257. GC_ARGS =
  258. ; Git health check.
  259. [git.fsck]
  260. ENABLE = true
  261. ; Execution interval in hours. Default is 24.
  262. INTERVAL = 24
  263. ; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
  264. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  265. ARGS =
  266. [i18n]
  267. 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,bg-BG
  268. NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本语,Español,Português,Polski,български
  269. [other]
  270. SHOW_FOOTER_BRANDING = false