app.ini 6.0 KB

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