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 8.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. # NEVER EVER MODIFY THIS FILE
  2. # PLEASE MAKE CHANGES ON CORRESPONDING CUSTOM CONFIG FILE
  3. ; App name that shows on every page title
  4. APP_NAME = Gogs: Go Git Service
  5. ; Change it if you run locally
  6. RUN_USER = git
  7. ; Either "dev", "prod" or "test", default is "dev"
  8. RUN_MODE = dev
  9. [repository]
  10. ROOT =
  11. SCRIPT_TYPE = bash
  12. [server]
  13. PROTOCOL = http
  14. DOMAIN = localhost
  15. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  16. HTTP_ADDR =
  17. HTTP_PORT = 3000
  18. ; Disable SSH feature when not available
  19. DISABLE_SSH = false
  20. SSH_PORT = 22
  21. ; Disable CDN even in "prod" mode
  22. OFFLINE_MODE = false
  23. DISABLE_ROUTER_LOG = false
  24. ; Generate steps:
  25. ; $ cd path/to/gogs/custom/https
  26. ; $ ./gogs cert -ca=true -duration=8760h0m0s -host=myhost.example.com
  27. ;
  28. ; Or from a .pfx file exported from the Windows certificate store (do
  29. ; not forget to export the private key):
  30. ; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys
  31. ; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes
  32. CERT_FILE = custom/https/cert.pem
  33. KEY_FILE = custom/https/key.pem
  34. ; Upper level of template and static file path
  35. ; default is the path where Gogs is executed
  36. STATIC_ROOT_PATH =
  37. ; Application level GZIP support
  38. ENABLE_GZIP = false
  39. ; Landing page for non-logged users, can be "home" or "explore"
  40. LANDING_PAGE = home
  41. [database]
  42. ; Either "mysql", "postgres" or "sqlite3", it's your choice
  43. DB_TYPE = mysql
  44. HOST = 127.0.0.1:3306
  45. NAME = gogs
  46. USER = root
  47. PASSWD =
  48. ; For "postgres" only, either "disable", "require" or "verify-full"
  49. SSL_MODE = disable
  50. ; For "sqlite3" only
  51. PATH = data/gogs.db
  52. [admin]
  53. [security]
  54. INSTALL_LOCK = false
  55. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  56. SECRET_KEY = !#@FDEWREWR&*(
  57. ; Auto-login remember days
  58. LOGIN_REMEMBER_DAYS = 7
  59. COOKIE_USERNAME = gogs_awesome
  60. COOKIE_REMEMBER_NAME = gogs_incredible
  61. ; Reverse proxy authentication header name of user name
  62. REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER
  63. [service]
  64. ACTIVE_CODE_LIVE_MINUTES = 180
  65. RESET_PASSWD_CODE_LIVE_MINUTES = 180
  66. ; User need to confirm e-mail for registration
  67. REGISTER_EMAIL_CONFIRM = false
  68. ; Does not allow register and admin create account only
  69. DISABLE_REGISTRATION = false
  70. ; User must sign in to view anything.
  71. REQUIRE_SIGNIN_VIEW = false
  72. ; Cache avatar as picture
  73. ENABLE_CACHE_AVATAR = false
  74. ; Mail notification
  75. ENABLE_NOTIFY_MAIL = false
  76. ; More detail: https://github.com/gogits/gogs/issues/165
  77. ENABLE_REVERSE_PROXY_AUTHENTICATION = false
  78. ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false
  79. [webhook]
  80. ; Cron task interval in minutes
  81. TASK_INTERVAL = 1
  82. ; Deliver timeout in seconds
  83. DELIVER_TIMEOUT = 5
  84. [mailer]
  85. ENABLED = false
  86. ; Buffer length of channel, keep it as it is if you don't know what it is.
  87. SEND_BUFFER_LEN = 10
  88. ; Name displayed in mail title
  89. SUBJECT = %(APP_NAME)s
  90. ; Mail server
  91. ; Gmail: smtp.gmail.com:587
  92. ; QQ: smtp.qq.com:25
  93. ; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
  94. HOST =
  95. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  96. SKIP_VERIFY =
  97. ; Mail from address, RFC 5322. This can be just an email address, or the "Name" <email@example.com> format
  98. FROM =
  99. ; Mailer user name and password
  100. USER =
  101. PASSWD =
  102. [oauth]
  103. ENABLED = false
  104. [oauth.github]
  105. ENABLED = false
  106. CLIENT_ID =
  107. CLIENT_SECRET =
  108. SCOPES = https://api.github.com/user
  109. AUTH_URL = https://github.com/login/oauth/authorize
  110. TOKEN_URL = https://github.com/login/oauth/access_token
  111. ; Get client id and secret from
  112. ; https://console.developers.google.com/project
  113. [oauth.google]
  114. ENABLED = false
  115. CLIENT_ID =
  116. CLIENT_SECRET =
  117. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  118. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  119. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  120. [oauth.qq]
  121. ENABLED = false
  122. CLIENT_ID =
  123. CLIENT_SECRET =
  124. SCOPES = get_user_info
  125. ; QQ 互联
  126. AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  127. TOKEN_URL = https://graph.qq.com/oauth2.0/token
  128. [oauth.weibo]
  129. ENABLED = false
  130. CLIENT_ID =
  131. CLIENT_SECRET =
  132. SCOPES = all
  133. AUTH_URL = https://api.weibo.com/oauth2/authorize
  134. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  135. [cache]
  136. ; Either "memory", "redis", or "memcache", default is "memory"
  137. ADAPTER = memory
  138. ; For "memory" only, GC interval in seconds, default is 60
  139. INTERVAL = 60
  140. ; For "redis" and "memcache", connection host address
  141. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  142. ; memcache: `127.0.0.1:11211`
  143. HOST =
  144. [session]
  145. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  146. PROVIDER = memory
  147. ; Provider config options
  148. ; memory: not have any config yet
  149. ; file: session file path, e.g. `data/sessions`
  150. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  151. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  152. PROVIDER_CONFIG = data/sessions
  153. ; Session cookie name
  154. COOKIE_NAME = i_like_gogits
  155. ; If you use session in https only, default is false
  156. COOKIE_SECURE = false
  157. ; Enable set cookie, default is true
  158. ENABLE_SET_COOKIE = true
  159. ; Session GC time interval, default is 86400
  160. GC_INTERVAL_TIME = 86400
  161. ; Session life time, default is 86400
  162. SESSION_LIFE_TIME = 86400
  163. [picture]
  164. ; The place to picture data, either "server" or "qiniu", default is "server"
  165. SERVICE = server
  166. AVATAR_UPLOAD_PATH = data/avatars
  167. ; Chinese users can choose "duoshuo"
  168. GRAVATAR_SOURCE = gravatar
  169. DISABLE_GRAVATAR = false
  170. [attachment]
  171. ; Whether attachments are enabled. Defaults to `true`
  172. ENABLE = true
  173. ; Path for attachments. Defaults to `data/attachments`
  174. PATH = data/attachments
  175. ; One or more allowed types, e.g. image/jpeg|image/png
  176. ALLOWED_TYPES = image/jpeg|image/png
  177. ; Max size of each file. Defaults to 32MB
  178. MAX_SIZE = 32
  179. ; Max number of files per upload. Defaults to 10
  180. MAX_FILES = 10
  181. [time]
  182. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  183. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  184. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  185. FORMAT =
  186. [log]
  187. ROOT_PATH =
  188. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  189. ; Use comma to separate multiple modes, e.g. "console, file"
  190. MODE = console
  191. ; Buffer length of channel, keep it as it is if you don't know what it is.
  192. BUFFER_LEN = 10000
  193. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  194. LEVEL = Trace
  195. ; For "console" mode only
  196. [log.console]
  197. LEVEL =
  198. ; For "file" mode only
  199. [log.file]
  200. LEVEL =
  201. ; This enables automated log rotate(switch of following options), default is true
  202. LOG_ROTATE = true
  203. ; Max line number of single file, default is 1000000
  204. MAX_LINES = 1000000
  205. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  206. MAX_SIZE_SHIFT = 28
  207. ; Segment log daily, default is true
  208. DAILY_ROTATE = true
  209. ; Expired days of log file(delete after max days), default is 7
  210. MAX_DAYS = 7
  211. ; For "conn" mode only
  212. [log.conn]
  213. LEVEL =
  214. ; Reconnect host for every single message, default is false
  215. RECONNECT_ON_MSG = false
  216. ; Try to reconnect when connection is lost, default is false
  217. RECONNECT = false
  218. ; Either "tcp", "unix" or "udp", default is "tcp"
  219. PROTOCOL = tcp
  220. ; Host address
  221. ADDR =
  222. ; For "smtp" mode only
  223. [log.smtp]
  224. LEVEL =
  225. ; Name displayed in mail title, default is "Diagnostic message from serve"
  226. SUBJECT = Diagnostic message from serve
  227. ; Mail server
  228. HOST =
  229. ; Mailer user name and password
  230. USER =
  231. PASSWD =
  232. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  233. RECEIVERS =
  234. ; For "database" mode only
  235. [log.database]
  236. LEVEL =
  237. ; Either "mysql" or "postgres"
  238. DRIVER =
  239. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  240. CONN =
  241. [git]
  242. MAX_GIT_DIFF_LINES = 10000
  243. ; Arguments for command 'git gc', e.g.: "--aggressive --auto"
  244. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  245. GC_ARGS =
  246. ; Git health check.
  247. [git.fsck]
  248. ENABLE = true
  249. ; Execution interval in hours. Default is 24.
  250. INTERVAL = 24
  251. ; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
  252. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  253. ARGS =
  254. [i18n]
  255. LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV,ru-RU,ja-JP
  256. NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu,Русский,日本语