-
Notifications
You must be signed in to change notification settings - Fork 207
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
Add deployment instructions #67
Comments
Hi @LukeSchlangen, Thanks for the note! Yeah, there've been a couple problems in the last couple weeks. Some were bugs that only manifested under the higher load the site has been getting recently, and others were deployment issues under load (like the process's ulimit being too low). I do believe that I have horsepaste on a sufficiently resourced box now and these issues should be resolved. That said, if you want to deploy it, here are some high-level notes:
When I deploy it horsepaste.com, I also setup a systemd service to restart the process if it crashes for some reason, and I also proxy all requests through nginx which handles TLS termination, gzip compression and sane request timeouts and the like. I run horsepaste on a DigitalOcean droplet running Ubuntu. |
I had issues with Heroku as well. The problem is that Heroku doesn't allow you to expose ports, they just assign you a port and you have to use that. So I made a couple changes and it was up and running. In the Dockerfile change EXPOSE 9091/tcp to CMD gunicorn --bind 0.0.0.0:$PORT wsgi and in main.go change const listenAddr=":9091" to var listenAddr = ":" + string(os.Getenv("PORT")) . That is all I had to do and it booted up on Heroku. |
@LukeSchlangen - I recommend deploying using the included Instructions are in the README. |
@jbowens This is awesome! I've tried playing the last two Friday nights, and the site has been down both times (I'm guessing because of the amount of traffic).
I tried deploying on Heroku and Netlify with no luck. Would you be able to share how you deploy (even if just where you deploy?) and I can attempt to deploy and then document that in the Readme?
Thank you!
The text was updated successfully, but these errors were encountered: