Skip to content

Commit

Permalink
Merge pull request #199 from alexrashed/docker
Browse files Browse the repository at this point in the history
Dockerfile
  • Loading branch information
Lukas0907 committed May 22, 2019
2 parents 8f11b03 + 9482559 commit c051195
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3-alpine

WORKDIR /usr/src/app

RUN apk add --no-cache openssl-dev libxml2-dev libxslt-dev

COPY . .

RUN apk add --no-cache --virtual .build-deps gcc musl-dev libffi-dev \
&& pip install -e . \
&& apk del .build-deps

ENTRYPOINT [ "feeds" ]
41 changes: 41 additions & 0 deletions docs/docker.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.. _Docker:

Docker
==========

If you prefer to run pyfeeds in a docker container, you can use the official `pyfeeds image <https://hub.docker.com/r/pyfeeds/pyfeeds/>`_.

A ``docker-compose.yaml`` could look like this:

.. code-block:: yaml
version: "3.7"
services:
pyfeeds:
image: pyfeeds/pyfeeds:latest
volumes:
- ./config:/config
- pyfeeds-output:/output
command: --config /config/feeds.cfg crawl
volumes:
pyfeeds-output:
name: pyfeeds-output
It mounts the ``config`` folder next to the ``docker-compose.yaml`` and uses the contained ``feeds.cfg`` as config for PyFeeds. The feeds are stored in a volume which could be picked up by a webserver:

.. code-block:: yaml
version: "3.7"
services:
pyfeeds-server:
image: nginx:stable-alpine
restart: always
volumes:
- pyfeeds-output:/usr/share/nginx/html:ro
volumes:
pyfeeds-output:
external: true
name: pyfeeds-output
Now any other container in the same docker network (f.e. a ttrss server) could access the feeds (f.e. http://pyfeeds-server/theoatmeal.com/feed.atom).
Add a port mapping in case you want to allow access from outside the container's docker network.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Feeds provides DIY Atom feeds in times of social media and paywall.
quickstart
configure
spiders
docker
development
contribute
license
Expand Down

0 comments on commit c051195

Please sign in to comment.