diff --git a/README.md b/README.md index 6eae0f9..5a25961 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,51 @@ -## Build +## About -```bash -git clone https://github.com/dbarton/docker-couchpotato.git -cd docker-couchpotato -docker build -t . +This is a Docker image for [CouchPotato](https://couchpota.to/) - the awesome movie PVR for usenet and torrents. + +## Configuration + +### Volumes + +Mount the following volumes inside your container: + +* `:/datadir` +* `:/media` + +### Configuration file + +By default the CouchPotato configuration is located on: + +``` +/datadir/config.ini ``` +If you want to change this, set the `CONFIG` environment variable. + +### CouchPotato Version + +By default the latest CouchPotato version will be used by pointing at the `master` tree of the [CouchPotato git repository](https://github.com/RuudBurger/CouchPotatoServer). +If you want a different version you've set the `VERSION` environment variable to a valid git branch or tag. + +_Please note that CouchPotato will automatically be updated when you restart your container._ + ## Run +### Run via docker CLI + ```bash docker run --name couchpotato -v :/datadir -v :/media dbarton/couchpotato ``` + +### Run via docker-compose + +```yaml +sabnzbd: + image: "dbarton/couchpotato" + container_name: "couchpotato" + volumes: + - ":/datadir" + - ":/media" + tty: true + stdin_open: true + restart: always +``` \ No newline at end of file diff --git a/start.sh b/start.sh index 0fc2bf0..09a10e4 100644 --- a/start.sh +++ b/start.sh @@ -1,7 +1,14 @@ #!/bin/sh -echo 'Updating CouchPotato...' +if [[ -n "${VERSION}" ]] +then + echo "Checking out SABnzbd version '${VERSION}'..." + git checkout ${VERSION} +fi + +echo "Updating CouchPotato..." git pull -echo 'Starting CouchPotato...' -exec ./CouchPotato.py --data_dir=/datadir --config_file=/datadir/config.ini +CONFIG=${CONFIG:-/datadir/config.ini} +echo "Starting CouchPotato with config '${CONFIG}'..." +exec ./CouchPotato.py --data_dir=/datadir --config_file=${CONFIG}