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.

243 lines
6.4 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
  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. [database]
  30. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  31. DB_TYPE = mysql
  32. HOST = 127.0.0.1:3306
  33. NAME = gogs
  34. USER = root
  35. PASSWD =
  36. ; For "postgres" only, either "disable", "require" or "verify-full"
  37. SSL_MODE = disable
  38. ; For "sqlite3" only
  39. PATH = data/gogs.db
  40. [admin]
  41. [security]
  42. INSTALL_LOCK = false
  43. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  44. SECRET_KEY = !#@FDEWREWR&*(
  45. ; Auto-login remember days
  46. LOGIN_REMEMBER_DAYS = 7
  47. COOKIE_USERNAME = gogs_awesome
  48. COOKIE_REMEMBER_NAME = gogs_incredible
  49. ; Reverse proxy authentication header name of user ID
  50. REVERSE_PROXY_AUTHENTICATION_UID = X-WEBAUTH-UID
  51. [service]
  52. ACTIVE_CODE_LIVE_MINUTES = 180
  53. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  54. ; User need to confirm e-mail for registration
  55. REGISTER_EMAIL_CONFIRM = false
  56. ; Does not allow register and admin create account only
  57. DISABLE_REGISTRATION = false
  58. ; User must sign in to view anything.
  59. REQUIRE_SIGNIN_VIEW = false
  60. ; Cache avatar as picture
  61. ENABLE_CACHE_AVATAR = false
  62. ; Mail notification
  63. ENABLE_NOTIFY_MAIL = false
  64. ; More detail: https://github.com/gogits/gogs/issues/165
  65. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  66. [webhook]
  67. ; Cron task interval in minutes
  68. TASK_INTERVAL = 1
  69. ; Deliver timeout in seconds
  70. DELIVER_TIMEOUT = 5
  71. [mailer]
  72. ENABLED = false
  73. ; Buffer length of channel, keep it as it is if you don't know what it is.
  74. SEND_BUFFER_LEN = 10
  75. ; Name displayed in mail title
  76. SUBJECT = %(APP_NAME)s
  77. ; Mail server
  78. ; Gmail: smtp.gmail.com:587
  79. ; QQ: smtp.qq.com:25
  80. HOST =
  81. ; Mail from address
  82. FROM =
  83. ; Mailer user name and password
  84. USER =
  85. PASSWD =
  86. [oauth]
  87. ENABLED = false
  88. [oauth.github]
  89. ENABLED = false
  90. CLIENT_ID =
  91. CLIENT_SECRET =
  92. SCOPES = https://api.github.com/user
  93. AUTH_URL = https://github.com/login/oauth/authorize
  94. TOKEN_URL = https://github.com/login/oauth/access_token
  95. ; Get client id and secret from
  96. ; https://console.developers.google.com/project
  97. [oauth.google]
  98. ENABLED = false
  99. CLIENT_ID =
  100. CLIENT_SECRET =
  101. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  102. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  103. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  104. [oauth.qq]
  105. ENABLED = false
  106. CLIENT_ID =
  107. CLIENT_SECRET =
  108. SCOPES = all
  109. ; QQ 互联
  110. ; AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  111. ; TOKEN_URL = https://graph.qq.com/oauth2.0/token
  112. ; Tencent weibo
  113. AUTH_URL = https://open.t.qq.com/cgi-bin/oauth2/authorize
  114. TOKEN_URL = https://open.t.qq.com/cgi-bin/oauth2/access_token
  115. [oauth.twitter]
  116. ENABLED = false
  117. CLIENT_ID =
  118. CLIENT_SECRET =
  119. SCOPES = all
  120. AUTH_URL = https://api.twitter.com/oauth/authorize
  121. TOKEN_URL = https://api.twitter.com/oauth/access_token
  122. [oauth.weibo]
  123. ENABLED = false
  124. CLIENT_ID =
  125. CLIENT_SECRET =
  126. SCOPES = all
  127. AUTH_URL = https://api.weibo.com/oauth2/authorize
  128. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  129. [cache]
  130. ; Either "memory", "redis", or "memcache", default is "memory"
  131. ADAPTER = memory
  132. ; For "memory" only, GC interval in seconds, default is 60
  133. INTERVAL = 60
  134. ; For "redis" and "memcache", connection host address
  135. ; redis: ":6039"
  136. ; memcache: "127.0.0.1:11211"
  137. HOST =
  138. [session]
  139. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  140. PROVIDER = file
  141. ; Provider config options
  142. ; memory: not have any config yet
  143. ; file: session file path, e.g. "data/sessions"
  144. ; redis: config like redis server addr, poolSize, password, e.g. "127.0.0.1:6379,100,astaxie"
  145. ; mysql: go-sql-driver/mysql dsn config string, e.g. "root:password@/session_table"
  146. PROVIDER_CONFIG = data/sessions
  147. ; Session cookie name
  148. COOKIE_NAME = i_like_gogits
  149. ; If you use session in https only, default is false
  150. COOKIE_SECURE = false
  151. ; Enable set cookie, default is true
  152. ENABLE_SET_COOKIE = true
  153. ; Session GC time interval, default is 86400
  154. GC_INTERVAL_TIME = 86400
  155. ; Session life time, default is 86400
  156. SESSION_LIFE_TIME = 86400
  157. ; session id hash func, Either "sha1", "sha256" or "md5" default is sha1
  158. SESSION_ID_HASHFUNC = sha1
  159. ; Session hash key, default is use random string
  160. SESSION_ID_HASHKEY =
  161. [picture]
  162. ; The place to picture data, either "server" or "qiniu", default is "server"
  163. SERVICE = server
  164. DISABLE_GRAVATAR = false
  165. [log]
  166. ROOT_PATH =
  167. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  168. ; Use comma to separate multiple modes, e.g. "console, file"
  169. MODE = console
  170. ; Buffer length of channel, keep it as it is if you don't know what it is.
  171. BUFFER_LEN = 10000
  172. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  173. LEVEL = Trace
  174. ; For "console" mode only
  175. [log.console]
  176. LEVEL =
  177. ; For "file" mode only
  178. [log.file]
  179. LEVEL =
  180. FILE_NAME = log/gogs.log
  181. ; This enables automated log rotate(switch of following options), default is true
  182. LOG_ROTATE = true
  183. ; Max line number of single file, default is 1000000
  184. MAX_LINES = 1000000
  185. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  186. MAX_SIZE_SHIFT = 28
  187. ; Segment log daily, default is true
  188. DAILY_ROTATE = true
  189. ; Expired days of log file(delete after max days), default is 7
  190. MAX_DAYS = 7
  191. ; For "conn" mode only
  192. [log.conn]
  193. LEVEL =
  194. ; Reconnect host for every single message, default is false
  195. RECONNECT_ON_MSG = false
  196. ; Try to reconnect when connection is lost, default is false
  197. RECONNECT = false
  198. ; Either "tcp", "unix" or "udp", default is "tcp"
  199. PROTOCOL = tcp
  200. ; Host address
  201. ADDR =
  202. ; For "smtp" mode only
  203. [log.smtp]
  204. LEVEL =
  205. ; Name displayed in mail title, default is "Diagnostic message from serve"
  206. SUBJECT = Diagnostic message from serve
  207. ; Mail server
  208. HOST =
  209. ; Mailer user name and password
  210. USER =
  211. PASSWD =
  212. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  213. RECEIVERS =
  214. ; For "database" mode only
  215. [log.database]
  216. LEVEL =
  217. ; Either "mysql" or "postgres"
  218. DRIVER =
  219. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  220. CONN =