FEATURE: Now using configurable CONFIG and VERSION

This commit is contained in:
Dominique Barton
2015-12-22 10:46:05 +01:00
parent b7eaaf0309
commit 314ffd49be
2 changed files with 53 additions and 8 deletions
+43 -5
View File
@@ -1,13 +1,51 @@
## Build
## About
```bash
git clone https://github.com/dbarton/docker-couchpotato.git
cd docker-couchpotato
docker build -t <tag> .
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 path>:/datadir`
* `<media path>:/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 path>:/datadir -v <media path>:/media dbarton/couchpotato
```
### Run via docker-compose
```yaml
sabnzbd:
image: "dbarton/couchpotato"
container_name: "couchpotato"
volumes:
- "<datadir path>:/datadir"
- "<media path>:/media"
tty: true
stdin_open: true
restart: always
```
+10 -3
View File
@@ -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}