7. Deploy!
if you have errors, you can fix them and simply push your changes to github and it will automatically redeploy
for example, I needed a fetch polyfill due to the older nodejs version so I added undici - I'm not sure if was due to my specific changes though since I added some stuff
This turned out to be pretty easy using Digital Ocean app platform! I'll make a short thread outlining the basic steps for getting your own feed generator up and running
1. Fork the example repo
https://github.com/bluesky-social/feed-generator
2. Get it working locally
Just follow the instructions in the README, basically just install deps using yarn, create an .env file and fill it in, then run yarn start! You'll see each post printed to the console as they come in. Note - you won't know what FEEDGEN_HOSTNAME is yet, leave it as is
3. Edit the post selection mechanism
Open /src/subscription.ts
This is where it chooses which posts to save to the database. Delete the console.log() and edit the filter on line 23 to select whatever posts you're looking for
4. Create the app on Digital Ocean app platform
On Digital Ocean, create a new app and select your git repo (make sure you pushed your changes)
Select smallest option ($5.00/mo at time of writing)
5. Add the environment variables
When prompted, add your environment variables. There's an option for bulk editing - you can paste your whole .env file in here
7. Deploy!
if you have errors, you can fix them and simply push your changes to github and it will automatically redeploy
for example, I needed a fetch polyfill due to the older nodejs version so I added undici - I'm not sure if was due to my specific changes though since I added some stuff
8. Redeploy with new env vars
Bluesky is broken and won't let me reply but the text is in here: https://pastebin.com/JW8t2pr5
Basically replace FEEDGEN_HOSTNAME with the URL it gives you (on the app platform and locally)
Big news! Each Community Handle now gets their own custom feed of the posts of community members! The feeds are all listed in the Feeds tab of my profile
FYI: you're still considered part of the community if you've signed up on the form, even if you've since changed your handle to somthing else!
ok can someone help me debug digital ocean app platform. I'm deploying the feed generator, it gets to this stage where I assume it should be working, hangs for a minute or so saying it's still deploying, then fails the build. any idea what I'm doing wrong? I set the port to 3000