Weekly App Install: Winds

Weekly App Install: Winds

It's Sunday afternoon and I've recently discovered two important things, neither of which have anything to do with this post. One is that Starbucks now has Pumpkin Cold Brew which means it is officially Fall 🎃. The second is that you can buy painters tape with preattached plastic (more on that in a future post). Both of these discoveries have changed my life. Now, back to some weekly app experimentations.

In previous posts I'd been just trawling through the Github trending section for inspiration, but to be honest a lot of stuff there these days that gets starred are lower level components. An npm module here or API framework there. Nothing visual and usually not a full application. I've found a great repository though that I'll be returning to on the regular and wanted to share:

awesome-selfhosted/awesome-selfhosted
A list of Free Software network services and web applications which can be hosted locally. Selfhosting is the process of hosting and managing applications instead of renting from Software-as-a-Serv...

This has a list of tons of free open source software that you can self-host and it's broken down by category. For this week I want to return to the idea of a better feed reader given my install of Tiny Tiny RSS continues to age and I was somewhat disappointed a few weeks ago when our exploration of another project RSSHub turned out to not be a reader at all. So today we'll look at Winds, which is an open source application built by Streams.

GetStream/Winds
A Beautiful Open Source RSS & Podcast App Powered by Getstream.io - GetStream/Winds

First off you can't argue with the screenshots, this app looks really nice.

From built in search functionality and a recommendation engine to a more modern UI this looks like it could be a real step up from what I'm using right now which to be honest has worked, but it's not pretty.

Tiny Tiny RSS UI

To get started the repository has a link to the latest releases at https://s3.amazonaws.com/winds-2.0-releases/latest.html but those appear to be desktop clients, not a self-hosted setup at all. Scrolling down the README I see more info on running it all on your own and there is Docker information at https://hub.docker.com/r/getstream/winds as well (though on second pass it appears that's the old version and not the newer one). You can see from the stack information at https://stackshare.io/stream/winds that there are quite a few things going on so take a sip of that silky smooth cold brew and let's get started.

So a few things it looks like we'll need that I can add to a single environment on Reclaim Cloud:

  • Node.js with the PM process manager
  • Redis
  • MongoDB

Beyond that there are a few third party dependencies like Sendgrid for email sending, Stream API which I assume is for the recommendations engine, Algolia for search, and Facebook for logins (hoping optional on that front). We'll tackle those after our environment is created so let's start with that.

I just used the latest version of the various technologies so hopefully that will be fine. The next step would be to grab the code so I head to https://github.com/GetStream/Winds/releases and grab a zip of the latest copy of the code and use the deployment manager to get it uploaded to the environment.

Moving along we need to navigate to the api folder and run yarn...

and also run yarn from the app folder.

Next we make a copy of the .env_example file in the app folder and start adding our secrets and environment variables. We'll start with a Stream account and setup an app there to get API keys.

Make a copy of the .env_example file in the app folder and start adding those keys in.

Reclaim Cloud emails me the hostnames for Mongo and Redis so I switch from localhost to using those and enter my API keys for Stream. I'm also supposed to setup "Feed Groups" in Stream for the app like so:

The next third party service we need is Algolia which is used for search and like Stream has a free tier.

Now with all that in the .env file the next step is to start the app, which may end up being the hardest part. It says to run pm2 start process_dev.json from the root directory but I suspect since pm is already running in my environment it's not going to be happy (and I was right).

Before I go too far down that path though I know the instructions start with information for a developer that wants to test and contribute but then moves into getting it ready for a "production environment" which sounds more like what I'm after so let's do that. It says to run ./api/build.sh from the ROOT folder.

Hmmm, another error. I have no idea if it will work but lets follow what it says and uninstall babel and instead install babel-cli to see if we get passed it.

Still no go. The instructions do also have a Docker option for production builds, but I'm reticent to go that route as I didn't create a Docker environment to start and that adds an entire extra layer to what should be a fairly simple build process here. It's at this point I realize I should be picking easier projects to tackle (lol). I tried a few different Node versions to see if there would be any difference and found it needs at least 13 but both 13 and the original 14 I was on both exhibit the same issue with building the production files.

So after taking a break I decided to give Docker a shot. With the same environment I would need root access to install Docker Engine as well as compose. We have a guide on how to do that here (basically it's a script that gives a container user sudo perms).

The instructions say "The commands above will prepare and start the API (and all workers). The frontend will still need to be started manually." so I confirmed the API side was up and running with docker ps

Only seeing the cache and database running had me suspect there was an issue starting the api. I looked at the logs of that container with docker logs api_api_1

2020-09-06T22:27:25: PM2 log: Launching in no daemon mode
2020-09-06T22:27:25: PM2 error: ENOENT: no such file or directory, open '/usr/src/api/process_prod.json'
2020-09-06T22:27:25: PM2 log: PM2 successfully stopped

I think that's about the limit of what I can troubleshoot here, there are just way too many roadblocks to getting this running self-hosted. Which is a shame as I imagine if they were to put together a compose file that covered both the frontend and backend it would be pretty easy to spin up.

Note to self: Pick something much less intimidating next week.