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

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