Host snippets with a git backend. Like Gists but OpenSource. https://gist.sigpipe.me/
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 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. APP_NAME = git.txt
  2. CAN_REGISTER = true
  3. ANONYMOUS_CREATE = true
  4. ; Either "dev", "prod" or "test"
  5. RUN_MODE = dev
  6. [server]
  7. PROTOCOL = http
  8. DOMAIN = localhost
  9. ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
  10. UNIX_SOCKET_PERMISSION = 666
  11. HTTP_ADDR = 0.0.0.0
  12. HTTP_PORT = 4000
  13. DISABLE_ROUTER_LOG = false
  14. ; Upper level of template and static file path
  15. ; default is the path where git.txt is executed
  16. STATIC_ROOT_PATH =
  17. [database]
  18. ; Either "mysql", "postgres" or "sqlite3", you can connect to TiDB with MySQL protocol
  19. DB_TYPE = sqlite3
  20. HOST = 127.0.0.1:3306
  21. NAME = gittxt
  22. USER = root
  23. PASSWD =
  24. ; For "postgres" only, either "disable", "require" or "verify-full"
  25. SSL_MODE = disable
  26. ; For "sqlite3" and "tidb", use absolute path when you start as service
  27. PATH = git.txt.db
  28. [repository]
  29. ; Root path for storing repositories's data, default is "~/<username>/gitxt-repositories"
  30. ROOT =
  31. ; If you want to disable cloning using HTTP
  32. DISABLE_HTTP_GIT = false
  33. ; You can specify full path to git if non-standard
  34. ; Git binary is only used for HTTP git upload-pack (checkout over HTTP)
  35. GIT_BINARY = git
  36. [log]
  37. ROOT_PATH =
  38. ; Can be "console" and "file", default is "console"
  39. ; Use comma to separate multiple modes, e.g. "console, file"
  40. MODE = console
  41. ; Buffer length of channel, keep it as it is if you don't know what it is.
  42. BUFFER_LEN = 100
  43. ; Either "Trace", "Info", "Warn", "Error", "Fatal", default is "Trace"
  44. LEVEL = Trace
  45. ; For "console" mode only
  46. [log.console]
  47. ; leave empty to inherit
  48. LEVEL =
  49. ; For "file" mode only
  50. [log.file]
  51. ; leave empty to inherit
  52. LEVEL =
  53. ; This enables automated log rotate (switch of following options)
  54. LOG_ROTATE = true
  55. ; Segment log daily
  56. DAILY_ROTATE = true
  57. ; Max size shift of single file, default is 28 means 1 << 28, 256MB
  58. MAX_SIZE_SHIFT = 28
  59. ; Max line number of single file
  60. MAX_LINES = 1000000
  61. ; Expired days of log file (delete after max days)
  62. MAX_DAYS = 7
  63. ; For "slack" mode only
  64. [log.slack]
  65. ; leave empty to inherit
  66. LEVEL =
  67. ; Webhook URL
  68. URL =
  69. [log.xorm]
  70. ; Enable file rotation
  71. ROTATE = true
  72. ; Rotate every day
  73. ROTATE_DAILY = true
  74. ; Rotate once file size excesses x MB
  75. MAX_SIZE = 100
  76. ; Maximum days to keep logger files
  77. MAX_DAYS = 3
  78. [session]
  79. ; Either "memory", "file", or "redis", default is "memory"
  80. PROVIDER = file
  81. ; Provider config options
  82. ; memory: not have any config yet
  83. ; file: session file path, e.g. `data/sessions`
  84. ; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180
  85. ; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table`
  86. PROVIDER_CONFIG = data/sessions
  87. ; Session cookie name
  88. COOKIE_NAME = i_like_ponies
  89. ; If you use session in https only, default is false
  90. COOKIE_SECURE = false
  91. ; Enable set cookie, default is true
  92. ENABLE_SET_COOKIE = true
  93. ; Session GC time interval, default is 3600
  94. GC_INTERVAL_TIME = 3600
  95. ; Session life time, default is 86400
  96. SESSION_LIFE_TIME = 86400
  97. ; Cookie name for CSRF
  98. CSRF_COOKIE_NAME = _csrf
  99. [security]
  100. ; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!!
  101. SECRET_KEY = !#@FDEWREWR&*(
  102. INSTALL_LOCK = false
  103. ; Auto-login remember days
  104. LOGIN_REMEMBER_DAYS = 7
  105. COOKIE_USERNAME = gitxt_celestia
  106. COOKIE_REMEMBER_NAME = gitxt_luna
  107. COOKIE_SECURE = false
  108. ; Enable to set cookie to indicate user login status
  109. ENABLE_LOGIN_STATUS_COOKIE = false
  110. LOGIN_STATUS_COOKIE_NAME = login_status
  111. [i18n]
  112. LANGS = en-US,fr-FR
  113. NAMES = English,Français
  114. [cron]
  115. ; Enable running cron tasks periodically.
  116. ENABLED = true
  117. ; Run cron tasks when Gitxt starts.
  118. RUN_AT_START = false
  119. ; Cleanup repository archives
  120. [cron.repo_archive_cleanup]
  121. RUN_AT_START = true
  122. SCHEDULE = @every 24h
  123. ; Time duration to check if archive should be cleaned
  124. OLDER_THAN = 24h
  125. [markdown]
  126. ; Enable hard line break extension
  127. ENABLE_HARD_LINE_BREAK = false
  128. ; List of custom URL-Schemes that are allowed as links when rendering Markdown
  129. ; for example git,magnet
  130. CUSTOM_URL_SCHEMES =
  131. ; List of file extensions that should be rendered/edited as Markdown
  132. ; Separate extensions with a comma. To render files w/o extension as markdown, just put a comma
  133. FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
  134. [smartypants]
  135. ENABLED = false
  136. FRACTIONS = true
  137. DASHES = true
  138. LATEX_DASHES = true
  139. ANGLED_QUOTES = true
  140. [mailer]
  141. ENABLED = true
  142. ; Buffer length of channel, keep it as it is if you don't know what it is.
  143. SEND_BUFFER_LEN = 100
  144. ; Name displayed in mail title
  145. SUBJECT = %(APP_NAME)s
  146. ; Mail server
  147. ; Gmail: smtp.gmail.com:587
  148. ; QQ: smtp.qq.com:465
  149. ; 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.
  150. HOST =
  151. ; Disable HELO operation when hostname are different.
  152. DISABLE_HELO =
  153. ; Custom hostname for HELO operation, default is from system.
  154. HELO_HOSTNAME =
  155. ; Do not verify the certificate of the server. Only use this for self-signed certificates
  156. SKIP_VERIFY =
  157. ; Use client certificate
  158. USE_CERTIFICATE = false
  159. CERT_FILE = conf/mailer/cert.pem
  160. KEY_FILE = conf/mailer/key.pem
  161. ; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <email@example.com>` format
  162. FROM =
  163. ; Mailer user name and password
  164. USER =
  165. PASSWD =
  166. ; Use text/plain as format of content
  167. USE_PLAIN_TEXT = false