Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to host Discord.RSS in Heroku! #45

Closed
Macleykun opened this issue Mar 28, 2018 · 14 comments
Closed

How to host Discord.RSS in Heroku! #45

Macleykun opened this issue Mar 28, 2018 · 14 comments
Labels

Comments

@Macleykun
Copy link
Contributor

Macleykun commented Mar 28, 2018

How to deploy to Heroku the new way!

Pre-requirements

  1. A Heroku account.
  2. Have all the credentials you need ready!

Instruction

  1. Go to the repo and use the purple looking button to deploy directly to Heroku!
  2. Fill in all the details, if you want to host the web dashboard, make sure to also do the following:
  • DRSS_WEB_CLIENT_ID
  • Get the CLIENT_ID by going here. It should look like: 343394333935336303.
  • RSS_WEB_CLIENT_SECRET
  • On the same page, copy the client secret.
  • DRSS_WEB_ENABLED
  • Set this to true. To enable the web part.
  • DRSS_WEB_REDIRECT_URI
  • Given the name you want to give to your app, make sure to replace APPNAME with yours! https://APPNAME.herokuapp.com/authorize. If you decide to use a domain, change the APPNAME.herokuapp.com to your domain name.
    *Given my appname: d-discordrss. With my domain: drss.meetdelta.com. I configured it as followed:
    Example redirect uri's
  • Do note that i added way to many, if you get into any problem, suggest to use both appname and domain name, in both http and https format.
  1. Now hit deploy and go to Resources. Turn off Worker and turn on Web. If you now click on Open app, you should see your own dashboard!
  2. Now, to keep Discord.rss up, it's recomanded to use uptimerobot. It's easy to use and even mails you when your bot goes down! When this happens just give it a few moments or reboot it by turning the switch off and on again!
  3. Given that you deployed with the button, you can choose to fork the repo, and to connect from Heroku to your app.
    How to connect Github fork to Heroku app
  4. Now, make sure to keep your fork up to date, you can use this project to do this automatically for you! You can set these env variables in the settings tab your Heroku app. You can add the script to the root of your forked repo. The changes should emmediatly trigger a push and build to your app.
  5. When that's set, go into your Heroku app to overview, and add the Heroku Scheduler. Configure it with the following: bash ./update.sh you can set the time to whatever you want.

That's it, not only haven't you installed any software, but your app will auto-update with the new dashboard working natively with Heroku!

@Macleykun
Copy link
Contributor Author

@synzen 👍

@infinitepower18
Copy link
Contributor

@Macley-Kun this guide should be updated for the current version of the bot with the web UI.

@Macleykun
Copy link
Contributor Author

Ah your right! Will do :-)

@Macleykun
Copy link
Contributor Author

Did this in a rush tho, as i'm doing quite alot at the same time :P i hope it's clear enough for everyone to follow. Let me know if it has any mistakes/improvements!

@infinitepower18
Copy link
Contributor

I suggest the original post be edited instead of a new comment.

@Macleykun
Copy link
Contributor Author

Well technically that old pose is so old, we didn't even had env variables or a deploy button.
The old one would be deleted, but still holds value if people don't wanna use the deploy button or with github integration.

If you want me to edit it, im gonna replace it (delete the old one).

@infinitepower18
Copy link
Contributor

infinitepower18 commented Jul 9, 2019

They can follow this one if they don't want to deploy using the button. I can rename the one I wrote to a manual deploy guide, as the title How to host without credit card is no longer valid as Heroku recently changed their dyno hours to take down Discord bots as well when the free 550 hours are up. So if they want to try out the bot and they're not ready to verify their account, they can follow the manual deploy guide, and if they want to go with it then they can verify their card later.

@Macleykun
Copy link
Contributor Author

Done!

@MicaelJarniac
Copy link

Go to the repo and use the purple looking button to deploy directly to Heroku!
@Macley-Kun

The URL in "the repo" links to https://github.com/synzen/Discord.RSS, but I believe that the user-deployable one, with the "purple looking button" and all, is at https://github.com/synzen/Discord.RSS-Clone.

@Macleykun
Copy link
Contributor Author

Ah it seems that the repository went totally different
If @synzen is ok with it, we could change the hard coded value in the button to:
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
Souce https://devcenter.heroku.com/articles/heroku-button
Could anyone test if the above works for everyone?

@MicaelJarniac
Copy link

MicaelJarniac commented Jul 24, 2020

Could anyone test if the above works for everyone?
@Macley-Kun

I tried it (the "manual" way, inspected element and replaced the reference to https://heroku.com/deploy) and it worked for me.

@Macleykun
Copy link
Contributor Author

Macleykun commented Jul 24, 2020 via email

@mxttbennett
Copy link

I keep getting the error "Web process failed to bind to $PORT within 60 seconds of launch)" when trying to deploy on Heroku. I've been reading up online and it seems like server.js needs to be set up to be listening to a port but I can't quite figure out how to do that

@Macleykun
Copy link
Contributor Author

Note that this repo is not meant to be ran but this one does
https://github.com/synzen/MonitoRSS-Clone
suggest everyone with questions about heroku to ask there.
Afaik, ya ran the web dyno and given you use the dashboard (make sure ya are using this) then I’m nit sure where the problem lies.
If ya do not wish to use the dashboard, use the worker dyno instead. Monitorrss is responsible for hooking in the var

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants