Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

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