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.

app.ini 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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 name
  50. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  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. [attachment]
  166. PATH =
  167. ; One or more allowed types, e.g. image/jpeg|image/png
  168. ALLOWED_TYPES =
  169. [log]
  170. ROOT_PATH =
  171. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  172. ; Use comma to separate multiple modes, e.g. "console, file"
  173. MODE = console
  174. ; Buffer length of channel, keep it as it is if you don't know what it is.
  175. BUFFER_LEN = 10000
  176. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  177. LEVEL = Trace
  178. ; For "console" mode only
  179. [log.console]
  180. LEVEL =
  181. ; For "file" mode only
  182. [log.file]
  183. LEVEL =
  184. FILE_NAME = log/gogs.log
  185. ; This enables automated log rotate(switch of following options), default is true
  186. LOG_ROTATE = true
  187. ; Max line number of single file, default is 1000000
  188. MAX_LINES = 1000000
  189. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  190. MAX_SIZE_SHIFT = 28
  191. ; Segment log daily, default is true
  192. DAILY_ROTATE = true
  193. ; Expired days of log file(delete after max days), default is 7
  194. MAX_DAYS = 7
  195. ; For "conn" mode only
  196. [log.conn]
  197. LEVEL =
  198. ; Reconnect host for every single message, default is false
  199. RECONNECT_ON_MSG = false
  200. ; Try to reconnect when connection is lost, default is false
  201. RECONNECT = false
  202. ; Either "tcp", "unix" or "udp", default is "tcp"
  203. PROTOCOL = tcp
  204. ; Host address
  205. ADDR =
  206. ; For "smtp" mode only
  207. [log.smtp]
  208. LEVEL =
  209. ; Name displayed in mail title, default is "Diagnostic message from serve"
  210. SUBJECT = Diagnostic message from serve
  211. ; Mail server
  212. HOST =
  213. ; Mailer user name and password
  214. USER =
  215. PASSWD =
  216. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  217. RECEIVERS =
  218. ; For "database" mode only
  219. [log.database]
  220. LEVEL =
  221. ; Either "mysql" or "postgres"
  222. DRIVER =
  223. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  224. CONN =