Host your talebook on synology with special performance-oriented optimization.
You must be quite familiar with command line and docker. Everything you do by following this readme is full of risk. Your data is valuable, any mistakes you have made could damange your data.
- Using MySQL instead of the default SQLite3 as the talebook database.
- Add permission for new registered users when you make your talebook public.
- Disable the web spider for hiding your talebook.
- Disable the register API for better security.
- Mount the calibre's database on memory.
- Cleanup your talebook logs and other temp files.
- Add a self hosted Douban API.
-
Install git on your synology from SynoCommunity repository.
-
Clone this project, rename it as
talebookand put it to the default path/volume1/docker
cd /volume1/docker/
git clone https://github.com/syhily/docker-talebook.git talebookThe default install path can be changed on your own needs. You should modify all the scripts and test it by yourself.
- Rename your calibre directory, move it to
/volume1/docker/talebook/books
# Rename
mv /full-path-to-your-calibre-library library
# Move
mv library /volume1/docker/talebook/booksIf you don't have any existed calibre library. You can use the sample library provided by talebook. It was only used for evaluation. This repository size is about 7.7 gigabytes, make sure your network condition is good.
git clone https://github.com/talebook/talebook-library.git
mv talebook-library/library /volume1/docker/talebook/books
rm -rf talebook-library-
Mount the memory disk for your calibre database. Execute the
scripts/mount-ramdisk.sh. You should create a Synology startup tasks by running this script withrootprivilege. -
Start up the talebook,
docker-compose up -d. You can access the talebook on8083port. -
The database on ramdisk should be synced for making data consistence. Create a Synology schedule task for executing the
scripts/update-original.shevery minute.
Caution
⚠️ : We recommend adding books or deleting books on talebook side. Don't using calibre for avoiding data losing after you enabling this schedule task. The latest talebook bundled a good batch import mechanism. Copy your books to/volume1/docker/talebook/imports, you can scan the new books and import them into talebook.
- Create a daily Synology schedule task for executing the
scripts/daily-cleanup-talebook.sh.