reddit/README.md

889 B
Executable File

Places to configure

./compose.yaml

You can change the host port, host volume directories, how often reddit is scanned for new data, and how often old data is removed.

./app/config.py

You can change how many posts are displayed per page load and how long data is retained.

Startup

docker compose build
docker compose up

The DB is created automatically. You will want to visit the /admin endpoint to set up your subreddits, then run

docker exec -it reddit-web-1 sh -c "python3 /app/scrape_posts.py"

to populate the DB with initial data, or you will have to wait for the scheduled task to get triggered for posts to start showing.

Thanks

This wouldn't be possible without https://github.com/datavorous/yars, which has been yoinked and tweaked to handle some more complex media cases. I will port my knowledge back to the project when time permits.