Docker: make it possible to use it as cli
continuous-integration/drone/push Build is passing Details

master
pictuga 2021-10-31 17:15:08 +01:00
parent 3f12258e98
commit 1ff7e4103c
3 changed files with 27 additions and 6 deletions

View File

@ -7,4 +7,4 @@ RUN pip3 install --no-cache-dir /app[full] gunicorn
USER 1000:1000 USER 1000:1000
CMD gunicorn --bind 0.0.0.0:8000 -w 4 --preload --access-logfile - morss ENTRYPOINT ["/app/docker-entry.sh"]

View File

@ -69,11 +69,10 @@ it with the system package manager.
### Docker ### Docker
Build & run Build
```shell ```shell
docker build --tag morss https://git.pictuga.com/pictuga/morss.git --no-cache --pull docker build --tag morss https://git.pictuga.com/pictuga/morss.git --no-cache --pull
docker run -p 8000:8000 morss
``` ```
With docker-compose: With docker-compose:
@ -91,7 +90,6 @@ Then execute
```shell ```shell
docker-compose build --no-cache --pull docker-compose build --no-cache --pull
docker-compose up
``` ```
## Run ## Run
@ -117,9 +115,19 @@ Works like a charm with [Tiny Tiny RSS](https://tt-rss.org/), and most probably
other clients. 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 #### Using Gunicorn
@ -191,6 +199,12 @@ For example: `morss --clip http://feeds.bbci.co.uk/news/rss.xml`
*(Brackets indicate optional text)* *(Brackets indicate optional text)*
If using Docker:
```shell
docker run morss --clip http://feeds.bbci.co.uk/news/rss.xml
```
### As a newsreader hook ### As a newsreader hook
To use it, the newsreader [Liferea](http://lzone.de/liferea/) is required To use it, the newsreader [Liferea](http://lzone.de/liferea/) is required

7
docker-entry.sh 100755
View File

@ -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