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.

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