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.

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