Push new posts from your favorite subreddit right to your phone!
You will need an account at Pushover to be able to run this. Be sure to also create an application and get the associated API Token/Key
as well.
Once you create an account and have both a User Key
and an API Token/Key
, you need to pass them in at runtime. Feel free to also set your preferred subreddit and the rate at which the services will poll and scrape Reddit. URLs must be to old.reddit.com
. The optional settings are:
- PushoverUserKey
- PushoverAppKey
- RedditFeedUrl (optional, defaults to r/GamingLeaksAndRumours/new/)
- PollRateInMinutes (optional, defaults to 60)
Simply run with the necessary environment variables set and the image specified.
docker run -itd --restart unless-stopped \
--env Settings__PushoverUserKey='abcd1234' \
--env Settings__PushoverAppKey='abcd1234' \
ghcr.io/rickdgray/redditpushdispatcher:main
First kill any currently running containers. Then update your local docker image with the following command.
docker pull ghcr.io/rickdgray/redditpushdispatcher:main
Then you can run the deployment command above to start anew.
Projects in .NET have an unusual folder structure, so when building we must both specify the context to be at the root of the solution, but also specify the location of the dockerfile
.
docker build -f .\RedditPushDispatcher\Dockerfile .
You can edit the launchSettings.json
file with your secrets. Then set the startup dropdown to "Docker" so that Visual Studio will create a container. This will allow you to debug with a local container.
{
"profiles": {
"Docker": {
"commandName": "Docker",
"environmentVariables": {
"Settings__PushoverUserKey": "abcd1234",
"Settings__PushoverAppKey": "abcd1234",
}
}
}
}