app_new.ini 8.4 KB

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