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.

273 lines
7.8 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  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. ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = false
  75. [webhook]
  76. ; Cron task interval in minutes
  77. TASK_INTERVAL = 1
  78. ; Deliver timeout in seconds
  79. DELIVER_TIMEOUT = 5
  80. [mailer]
  81. ENABLED = false
  82. ; Buffer length of channel, keep it as it is if you don't know what it is.
  83. SEND_BUFFER_LEN = 10
  84. ; Name displayed in mail title
  85. SUBJECT = %(APP_NAME)s
  86. ; Mail server
  87. ; Gmail: smtp.gmail.com:587
  88. ; QQ: smtp.qq.com:25
  89. ; 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.
  90. HOST =
  91. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  92. SKIP_VERIFY =
  93. ; Mail from address, RFC 5322. This can be just an email address, or the "Name" <email@example.com> format
  94. FROM =
  95. ; Mailer user name and password
  96. USER =
  97. PASSWD =
  98. [oauth]
  99. ENABLED = false
  100. [oauth.github]
  101. ENABLED = false
  102. CLIENT_ID =
  103. CLIENT_SECRET =
  104. SCOPES = https://api.github.com/user
  105. AUTH_URL = https://github.com/login/oauth/authorize
  106. TOKEN_URL = https://github.com/login/oauth/access_token
  107. ; Get client id and secret from
  108. ; https://console.developers.google.com/project
  109. [oauth.google]
  110. ENABLED = false
  111. CLIENT_ID =
  112. CLIENT_SECRET =
  113. SCOPES = https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
  114. AUTH_URL = https://accounts.google.com/o/oauth2/auth
  115. TOKEN_URL = https://accounts.google.com/o/oauth2/token
  116. [oauth.qq]
  117. ENABLED = false
  118. CLIENT_ID =
  119. CLIENT_SECRET =
  120. SCOPES = get_user_info
  121. ; QQ 互联
  122. AUTH_URL = https://graph.qq.com/oauth2.0/authorize
  123. TOKEN_URL = https://graph.qq.com/oauth2.0/token
  124. [oauth.weibo]
  125. ENABLED = false
  126. CLIENT_ID =
  127. CLIENT_SECRET =
  128. SCOPES = all
  129. AUTH_URL = https://api.weibo.com/oauth2/authorize
  130. TOKEN_URL = https://api.weibo.com/oauth2/access_token
  131. [cache]
  132. ; Either "memory", "redis", or "memcache", default is "memory"
  133. ADAPTER = memory
  134. ; For "memory" only, GC interval in seconds, default is 60
  135. INTERVAL = 60
  136. ; For "redis" and "memcache", connection host address
  137. ; redis: `:6039`
  138. ; memcache: `127.0.0.1:11211`
  139. HOST =
  140. [session]
  141. ; Either "memory", "file", "redis" or "mysql", default is "memory"
  142. PROVIDER = memory
  143. ; Provider config options
  144. ; memory: not have any config yet
  145. ; file: session file path, e.g. `data/sessions`
  146. ; redis: config like redis server addr, poolSize, password, e.g. `127.0.0.1:6379,100,gogs`
  147. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  148. PROVIDER_CONFIG = data/sessions
  149. ; Session cookie name
  150. COOKIE_NAME = i_like_gogits
  151. ; If you use session in https only, default is false
  152. COOKIE_SECURE = false
  153. ; Enable set cookie, default is true
  154. ENABLE_SET_COOKIE = true
  155. ; Session GC time interval, default is 86400
  156. GC_INTERVAL_TIME = 86400
  157. ; Session life time, default is 86400
  158. SESSION_LIFE_TIME = 86400
  159. [picture]
  160. ; The place to picture data, either "server" or "qiniu", default is "server"
  161. SERVICE = server
  162. AVATAR_UPLOAD_PATH = data/avatars
  163. ; Chinese users can choose "duoshuo"
  164. GRAVATAR_SOURCE = gravatar
  165. DISABLE_GRAVATAR = false
  166. [attachment]
  167. ; Whether attachments are enabled. Defaults to `true`
  168. ENABLE = true
  169. ; Path for attachments. Defaults to `data/attachments`
  170. PATH = data/attachments
  171. ; One or more allowed types, e.g. image/jpeg|image/png
  172. ALLOWED_TYPES = image/jpeg|image/png
  173. ; Max size of each file. Defaults to 32MB
  174. MAX_SIZE = 32
  175. ; Max number of files per upload. Defaults to 10
  176. MAX_FILES = 10
  177. [time]
  178. ; Specifies the format for fully outputed dates. Defaults to RFC1123
  179. ; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
  180. ; For more information about the format see http://golang.org/pkg/time/#pkg-constants
  181. FORMAT =
  182. [log]
  183. ROOT_PATH =
  184. ; Either "console", "file", "conn", "smtp" or "database", default is "console"
  185. ; Use comma to separate multiple modes, e.g. "console, file"
  186. MODE = console
  187. ; Buffer length of channel, keep it as it is if you don't know what it is.
  188. BUFFER_LEN = 10000
  189. ; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
  190. LEVEL = Trace
  191. ; For "console" mode only
  192. [log.console]
  193. LEVEL =
  194. ; For "file" mode only
  195. [log.file]
  196. LEVEL =
  197. ; This enables automated log rotate(switch of following options), default is true
  198. LOG_ROTATE = true
  199. ; Max line number of single file, default is 1000000
  200. MAX_LINES = 1000000
  201. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  202. MAX_SIZE_SHIFT = 28
  203. ; Segment log daily, default is true
  204. DAILY_ROTATE = true
  205. ; Expired days of log file(delete after max days), default is 7
  206. MAX_DAYS = 7
  207. ; For "conn" mode only
  208. [log.conn]
  209. LEVEL =
  210. ; Reconnect host for every single message, default is false
  211. RECONNECT_ON_MSG = false
  212. ; Try to reconnect when connection is lost, default is false
  213. RECONNECT = false
  214. ; Either "tcp", "unix" or "udp", default is "tcp"
  215. PROTOCOL = tcp
  216. ; Host address
  217. ADDR =
  218. ; For "smtp" mode only
  219. [log.smtp]
  220. LEVEL =
  221. ; Name displayed in mail title, default is "Diagnostic message from serve"
  222. SUBJECT = Diagnostic message from serve
  223. ; Mail server
  224. HOST =
  225. ; Mailer user name and password
  226. USER =
  227. PASSWD =
  228. ; Receivers, can be one or more, e.g. ["1@example.com","2@example.com"]
  229. RECEIVERS =
  230. ; For "database" mode only
  231. [log.database]
  232. LEVEL =
  233. ; Either "mysql" or "postgres"
  234. DRIVER =
  235. ; Based on xorm, e.g.: root:root@localhost/gogs?charset=utf8
  236. CONN =
  237. [git]
  238. MAX_GITDIFF_LINES = 10000
  239. ; Arguments for command 'git fsck', e.g.: "--unreachable --tags"
  240. ; see more on http://git-scm.com/docs/git-fsck/1.7.5
  241. FSCK_ARGS =
  242. ; Arguments for command 'git gc', e.g.: "--aggressive --auto"
  243. ; see more on http://git-scm.com/docs/git-gc/1.7.5
  244. GC_ARGS =
  245. [i18n]
  246. LANGS = en-US,zh-CN,zh-HK,de-DE,fr-CA,nl-NL,lv-LV
  247. NAMES = English,简体中文,繁體中文,Deutsch,Français,Nederlands,Latviešu