This is the recommended way for Linux deployment machines.
- Make sure host
/dataexists, is mounted on the permanent disk, and contains/data/audio-book/.
findmnt /data
ls -ld /data/audio-book- Build the image from GitHub, so each build pulls the latest
maincode.
docker build -t audiobook:latest https://github.com/BernieHuang2008/AudioBook.git#main- Start the container.
docker run -d \
--name audiobook \
--restart unless-stopped \
-p 5001:5001 \
-v /data:/data \
audiobook:latest- Make sure Docker itself starts on boot.
sudo systemctl enable --now dockerThe app keeps using data_dir = /data/audio-book/, so data stays under host /data/audio-book/.
If you still want the legacy systemd setup on a Linux server:
- edit
service/start.shandservice/xread.service, replace the path with the absolute path toserver.pyandstart.sh - run
service/install.sh
bash ./service/install.sh