facundoolano / feedi

RSS + Mastodon feed reader
GNU Affero General Public License v3.0
892 stars 28 forks source link

How to import feeds.opml while using Docker? #62

Closed limaceous-bushwhacker closed 11 months ago

limaceous-bushwhacker commented 11 months ago

Title.

facundoolano commented 11 months ago

Hi. Assuming that you drop a feeds.opml file in the repo directory and then run make docker to run the app, you could then get the container id with docker ps. With that, this should do the trick:

docker exec -it $CONTAINER_ID /bin/sh -c "FLASK_ENV=development flask --app feedi/app.py feed load-opml feeds.opml admin@admin.com" 

Similarly, if you want to force a sync of the imported feeds:

docker exec -it $CONTAINER_ID /bin/sh -c "FLASK_ENV=development flask --app feedi/app.py feed sync"

It's a bit cumbersome because I haven't been using this with docker, so there are no helper commands. We could probably add another make target to run generic flask commands like that.

facundoolano commented 11 months ago

Ok, I just pushed a make helper, so the commands above would be:

make docker-flask CMD="feed load-opml feeds.opml admin@admin.com"

make docker-flask CMD="feed sync"