-
-
Save miyachan/4d214b6f0823864cfa51dd25951d3212 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## HTTP API Server Address for Torako. If this is omitted or 0, | |
## the API server will be disabled. | |
api_addr = "127.0.0.1:2377" | |
## Global Imageboard API Rate Limit in Request/Second/ | |
## this rate limit only affects downloading the JSON threads/posts | |
## and will ensure api requests are throttled appropirately. | |
## If this option is not specified, there will be no rate limiting | |
#rate_limit = 10 | |
request_timeout = "30m" | |
[boards] | |
## Enable TLS for API calls (Default: true) | |
#tls = true | |
## Imageboard API hostname (Default: "a.4cdn.org") | |
#host = "a.4cdn.org" | |
## Default refresh rate for boards (Default: 10s) | |
#refresh_rate = 10s | |
## Default deleted page threshold. If threads | |
## are removed before this threshold is reached | |
## then the thread is marked as (moderator) deleted | |
## (Default: 8) | |
#deleted_page_threshold = 8 | |
## Download thumbnails (Default: true) | |
#download_thumbs = true | |
## Download media/images (Default: true) | |
#download_media = true | |
## List the boards that should be archived | |
[boards.3] | |
[boards.a] | |
[boards.aco] | |
[boards.adv] | |
[boards.an] | |
[boards.asp] | |
[boards.b] | |
[boards.bant] | |
[boards.biz] | |
[boards.c] | |
[boards.cgl] | |
[boards.ck] | |
[boards.cm] | |
[boards.co] | |
[boards.d] | |
[boards.diy] | |
[boards.e] | |
[boards.fa] | |
[boards.fit] | |
[boards.g] | |
[boards.gd] | |
[boards.gif] | |
#download_media = false | |
[boards.h] | |
[boards.hc] | |
[boards.his] | |
[boards.hm] | |
[boards.hr] | |
[boards.i] | |
[boards.ic] | |
[boards.int] | |
[boards.jp] | |
[boards.k] | |
[boards.lgbt] | |
[boards.lit] | |
[boards.m] | |
[boards.mlp] | |
[boards.mu] | |
[boards.n] | |
[boards.news] | |
[boards.o] | |
[boards.out] | |
[boards.p] | |
[boards.po] | |
[boards.pol] | |
[boards.qa] | |
[boards.qst] | |
[boards.r] | |
[boards.r9k] | |
[boards.s] | |
[boards.s4s] | |
[boards.sci] | |
[boards.soc] | |
[boards.sp] | |
[boards.t] | |
[boards.tg] | |
[boards.toy] | |
[boards.trash] | |
[boards.trv] | |
[boards.tv] | |
[boards.u] | |
[boards.v] | |
[boards.vg] | |
[boards.vip] | |
[boards.vm] | |
[boards.vmg] | |
[boards.vp] | |
[boards.vr] | |
[boards.vrpg] | |
[boards.vst] | |
[boards.w] | |
[boards.wg] | |
[boards.wsg] | |
#download_media = false | |
[boards.wsr] | |
[boards.x] | |
[boards.y] | |
[backend] | |
[backend.asagi] | |
## Download thumbnails. Disabling this will prevent the | |
## asagi storage backend from downloading thumbnails (Default: true) | |
#thumbs = false | |
## Download media. Disabling this will prevent the | |
## asagi storage backend from downloading media (Default: true) | |
#media = false | |
## Media content host URL. (Default: "https://i.4cdn.org/") | |
# media_url = "https://i.4cdn.org/" | |
## Thumb content host URL (Default: "https://i.4cdn.org/") | |
# thumb_url = "https://i.4cdn.org/" | |
## Media Path. This is where downloaded content is stored. If this is not | |
## provided then media downloading will be disabled. | |
media_path = "/var/lib/torako" | |
# TMP dir. (Default: System Temp Path + /torako) | |
#tmp_dir = "/tmp/torako" | |
## Old Directory Structure. This is a legacy option in Asagi. (Default: false) | |
#old_dir_structure = false | |
## Web UNIX Group. On Unix system, if this is set, all downloads and download | |
## folders will have their group ownership set to this. (Default: None) | |
web_unix_group = "torako" | |
## If we fail to save a thread or post to MySQL for whatever | |
## reason, we should consider this as a fatal error and | |
## stop Torako. The operator (or system) should restart Torako. | |
## Due to Torako's design is we fail to save a post/thread, then | |
## that thread could be lost if this is set to false. | |
#persist_error_is_fatal = true | |
## Inflight Posts. This number denotes how many posts can be buffered in memory | |
## at a time before Asagi rejects accepting more posts. This acts as a form | |
## of backpressure and can be used to optimize memory usage or database activity | |
## Note that this is an *advisory* limit, and can be temporarily exceeded. | |
## (Ex. if the limit is 10, and we receieve a thread with 11 posts, we will | |
## buffer all 11 posts in memory, but no more posts will be archived until the | |
## 11 posts are persisted to the database) | |
## Default: unlimited | |
#inflight_posts = 1024 | |
## Concurrent Downloads. This number controls the amount of simultaneous media | |
## downloads that can happen at once. For the Asagi storage backend a single | |
## download might be both the thumbnail and media, so a concurrent_downloads | |
## value of "1", might start 2 downloads (one for the thumb and the media). | |
## Unlike `inflight_posts`, this value is not advisory and the number of | |
## concurrent downloads will ont exceed this number. | |
## Tune this number according to your memory and bandwidth preferences | |
## (Default: 128) | |
concurrent_downloads = 1024 | |
## Setting this to true means that the media download queue will backpressure | |
## the system, and once all concurrent_download slots are full, no more new | |
## posts will be scraped until there is capacity to download more images. | |
## Turning this on will decrease memory pressure at the cost of pausing | |
## archiving if the download queue is full. The download queue can "fill up" | |
## for example when starting an archive of a fresh board and all the images | |
## must be downloaded. | |
#media_backpressure = false | |
[backend.asagi.database] | |
## Database URL. Usually in the format of | |
## mysql://username:password@host/db_name. | |
## Only MySQL is supported today. | |
url = "mysql://[email protected]/torako" | |
## Database Charset (Default: "utf8mb4") | |
charset = "utf8mb4" | |
## In Asagi's original design, 2nd-level tables such as board_threads and other | |
## stats were handled via MySQL triggers. This may be problematic for high load | |
## databases. If `use_triggers` is set to false, the updates to child tables | |
## will be computed by Torako and flushed to MySQL in a single transaction. | |
## WARNING: If you set `use_triggers` to false, Torako WILL DROP YOUR insert & | |
## update triggers. Running Torako again with `use_triggers` as true will | |
## recreate those triggers. | |
## (Default: true) | |
use_triggers = false | |
## Compute stats in the board_daily and board_users table. For Torako to handle | |
## this, you must set `use_triggers` to false as these stats are computed | |
## by Torako and flushed to MySQL. | |
## (Default: false) | |
compute_stats = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment