boypt / simple-torrent

☁️ Simple Torrent: a self-hosted remote torrent client (rebranded from Cloud Torrent)
GNU Affero General Public License v3.0
1k stars 312 forks source link

how to specify --config path for docker run? #131

Closed vihatsoft closed 3 years ago

vihatsoft commented 3 years ago

when i run docker command in ubuntu not find cloud-torrent.json. where save config file while using docker? and how to set config path for bellow docker command?

$ docker run -d -p 3000:3000 -v /path/to/my/downloads:/downloads -v /path/to/my/torrents:/torrents boypt/cloud-torrent thank you,

boypt commented 3 years ago

Just map the config file as a volume:

docker run --rm -p 3000:3000 \
    -v /tmp/downloads:/downloads \
    -v /tmp/torrents:/torrents \
    -v /tmp/cloud-torrent.yaml:/etc/cloud-torrent.yaml \
    boypt/cloud-torrent --debug

you can download an example config file from https://raw.githubusercontent.com/boypt/simple-torrent/master/example-cloud-torrent.yaml

But careful with the downloaddir and watchdir in the configure file, must match the mapping volume with the command you run.

Personally I prefer to use docker-compose, see https://github.com/boypt/simple-torrent/blob/master/docker-compose.yml

Later I will draft some examples using docker

vihatsoft commented 3 years ago

thank you for your help.

vihatsoft commented 3 years ago

please post docker-compose example.

boypt commented 3 years ago

docker-compose.yaml is in the repo already

vihatsoft commented 3 years ago

yes brother, got it. thank you