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.

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