diff --git a/Dockerfile b/Dockerfile index 80ed8d1..6a22947 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,4 @@ RUN pip3 install --no-cache-dir /app[full] gunicorn USER 1000:1000 -CMD gunicorn --bind 0.0.0.0:8000 -w 4 --preload --access-logfile - morss +ENTRYPOINT ["/app/docker-entry.sh"] diff --git a/README.md b/README.md index d4db131..b06e924 100644 --- a/README.md +++ b/README.md @@ -69,11 +69,10 @@ it with the system package manager. ### Docker -Build & run +Build ```shell docker build --tag morss https://git.pictuga.com/pictuga/morss.git --no-cache --pull -docker run -p 8000:8000 morss ``` With docker-compose: @@ -91,7 +90,6 @@ Then execute ```shell docker-compose build --no-cache --pull -docker-compose up ``` ## Run @@ -117,9 +115,19 @@ Works like a charm with [Tiny Tiny RSS](https://tt-rss.org/), and most probably other clients. -#### Via Docker +#### Using Docker -See above (in Install) +Run + +```shell +docker run -p 8000:8000 morss +``` + +With docker-compose: + +```shell +docker-compose up +``` #### Using Gunicorn @@ -191,6 +199,12 @@ For example: `morss --clip http://feeds.bbci.co.uk/news/rss.xml` *(Brackets indicate optional text)* +If using Docker: + +```shell +docker run morss --clip http://feeds.bbci.co.uk/news/rss.xml +``` + ### As a newsreader hook To use it, the newsreader [Liferea](http://lzone.de/liferea/) is required diff --git a/docker-entry.sh b/docker-entry.sh new file mode 100755 index 0000000..aa7122a --- /dev/null +++ b/docker-entry.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +if [ ! -z "$1" ]; then + morss $@ +else + gunicorn --bind 0.0.0.0:8000 -w 4 --preload --access-logfile - morss +fi