Code Monkey home page Code Monkey logo

Comments (8)

ck3g avatar ck3g commented on June 9, 2024 1

Not a problem. That's why it's labeled with "Hacktoberferst"

from homebugh.

fabiosoaresv avatar fabiosoaresv commented on June 9, 2024 1

@ck3g Can you check my PR please? #106

from homebugh.

keivalya avatar keivalya commented on June 9, 2024

I can do that, I've deployed a twitter bot to heroku and I think I can document to do so too!

from homebugh.

ck3g avatar ck3g commented on June 9, 2024

Perfect!

from homebugh.

keivalya avatar keivalya commented on June 9, 2024

I hope you won't mind me doing it in October if it's not urgent. I'm a beginner in open source and want to start with HactoberFest.

from homebugh.

NNTin avatar NNTin commented on June 9, 2024

@keivalya I just want to tell you it is not as trivial as you think it might be. It requires a bit of rewrite of the code and it isn't something beginner friendly.

First if you implement Heroku support properly you'd just have a 1-click deployment. (See how there is no need of me using git or any terminal.)

Second Heroku uses an ephemeral file system.

During the dyno’s lifetime its running processes can use the filesystem as a temporary scratchpad, but no files that are written are visible to processes in any other dyno and any files written will be discarded the moment the dyno is stopped or restarted.

You can't run the database on the Heroku dyno because the file will be lost due to ephemeral filesystem. This means it needs to rely on a database. Which this project is doing -> MySQL. But setting up the database isn't trivial and it is locally hosted. Furthermore you'd exceed the 500 MB quota. For Heroku you need a MySQL database add on. And that you need to integrate into the code.
You also need to make the project bind to $PORT supplied by Heroku.

When you deployed a Twitter bot you didn't have to worry about all that.

Just a heads up. If you manage to do it anyway kudos to you.

from homebugh.

keivalya avatar keivalya commented on June 9, 2024

@NNTin thank you so much!
I'm just an acquaintance with Databases, not my comfort zone, yet I'll try it once. I hope I'll be able to do so.

Thank you again, your comment is really helpful and definitely looking forward to learning new stuff!

Any kind of resource, you would like to suggest?

from homebugh.

ck3g avatar ck3g commented on June 9, 2024

Hey @NNTin thanks for the heads up.

Here are my thoughts on that.

The goal here is not to run the application for production use for lots of users. The goal is to help somebody to set it up on Heroku for their personal use.

There are no file upload features in the application, so there is no need for a filesystem.
As for the database, I think it's well enough to start from the lowest (free) tier, and then anyone can decide to move to the higher tier when (and if) they reach the database size limits.

For Heroku you need a MySQL database add on.

That's is correct.

And that you need to integrate into the code.

I think that's enough to update config/database.yml with proper credentials file to complete the integration.

You also need to make the project bind to $PORT supplied by Heroku.

I don't know that does it mean, but the deployed applications are working fine on port 80.


In the end, we need to have a simplified version of Getting Started on Heroku with Rails specific to that project.

I would suggest starting with very simple instructions and then improve them over time.

from homebugh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.