Finding Heroku Alternatives After Being Forced to Pay $5 for Eco Dynos

in DevTalk2 years ago


jon-_xVOXs1GVvk-unsplash.jpg
Photo by Jøn on Unsplash

If you're like me, I hate paid plans.

Literally, I'm poor and a cheapskate to gamble my credit card online.

AND I looove anything for free!!

That's the reason why I chose Heroku over AWS or GCP, man, I don't even know how to use those things yet, but stay tuned as I will be posting special AWS-related goodies for tech bros and wannabes.

I love Python, but not all XaaS supports Python better than Heroku.

When I started with Heroku, it was swift, fast, swoosh... zing!

You basically just need an IDE (or Text Editor & CMD) and Heroku-CLI to build solutions that scale. Just write your app, add some required files, and git push to Heroku.

No complicate DevOps, just basically you and Heroku.

Recession Thingy

With the massive tech layoffs, you'll know that something isn't right anymore.

Companies gonna try to survive and will make drastic decisions to avoid bankruptcy, from flattening the management to cutting down on free stuff. One dreaded announcement is being part of the layoffs.

But that's on the operation-side.

The executives might also do spring cleaning on their roadmap and portfolios. It can be (temporarily) removing product lines to adding diversity depending on what works based on their in-depth market research.

That's the thing.

Remove what is costing the company.

Recently, Heroku announced that it will be removing free Dynos by the end of November and those who failed to make changes will automatically transfer all projects to their $5 Eco Dynos Plan.

Five Dollars Eco Dynos Plan.

But is it the right move?

Is Heroku pushing away potential (and loyal) customers away?

Well, companies with sizeable budgets wont probably care, it's only the Hobby Developers that will be scrambling to shell out $5 or be kicked out of Heroku as soon December comes.

Heroku Alternatives

As soon as I read the message on my Heroku Dashboard and after reading more about the announcement, I immediately hopped to Google in search for alternatives.

And there, I found Deta and Fly.io as potential Heroku alternatives.

Why Deta and Fly.io?

Well, I mainly do Python (Flask) projects that deals with heavy compute jobs and a dynamic UI, so my priority is on anything Python-friendly.

So Deta? Deta is the cool-kid in town, your aesthetic-esque Gen-Z who is also a fighter. Deta is creator-driven and less on Enterprise. It wants developers creators to use Deta, no degree required... programming skill is still required 100%, trust me.

But... but, care to wait on their waitlist?

Count me in!

While on the wait, here's Fly.io flying around the corner.

Fly.io is probably Heroku-esque, but without the commitments. It is basically free for all, pay only when you exceed quota. Yes, welcome to Fly!

If you use Windows, just pop PowerShell open and run:

cd "C:\Program Files"
iwr https://fly.io/install.ps1 -useb | iex

And you're good to go!

Login using your email (or GitHub), just read what data is shared and make sure you understand it well. Run on PowerShell:

flyctl auth login

Whoops! Of course, at this point, you need to have Git and Python 3 installed and configured.

If you already had your Heroku repository, there are minor configurations that is needed to run it on fly. Or if you're still exploring fly, just clone the sample project on your local directory.

git clone https://github.com/fly-apps/python-hellofly-flask
cd python-hellofly-flask 

If you haven't installed venv yet, please do so now and activate it. This is for Windows, so check out what's for Linux/MacOS.

py -m pip install --upgrade --user virtualenv
py -m venv venv
.\venv\Scripts\activate
cls

Either you are working on your original project or with the sample, once the virtual environment is activated, re-install all required packages. You need Flask and gunicorn successfully installed to run your web app.

py -m pip install -r requirements.txt

Optionally, to avoid errors, install the python-dotenv package to run .env files required to run the Flask app.

pip install python-dotenv

Then create a .flaskenv file with the following contents:

FLASK_APP=hellofly.py
FLASK_ENV=production
FLASK_DEBUG=0

The you're good to go, you can now run the Flask app locally!

flask run

You can open http://127.0.0.1:5000 on a browser to check. Or continue with the next steps.

Configuring the App for Fly

Basically, it's almost the same with Heroku with a few more steps. You may need to use a PowerShell for this and not cmd or GitForWindows, see StackOverflow.

We're almost there, we can beat Heroku out of the free game. Just lanuch your new app. So we're launching the app with the region set to Singapore here.

flyctl launch --name appname -r sin

And there you go! Fly needs your credit card before you can come in, unlike Heroku, btw. I will definitely miss Heroku, but it is quite know that Heroku is expensive and having not-so-flexible schemes, and their recent changes is forcing creativity away from conception.

Error We need your payment information to continue! Add a credit card or buy credit: https://fly.io/dashboard/xxxxxx/billing

Do you want to continue? If so, just follow the house rules and view the main tutorials page to learn how to launch it live on the internet. I may personally still need for Deta to email me soon before ruling things out. :/

Do you have questions or want to connect? Just comment or DM me :)





 
Rydeon ⟠
 
Sup frens, Rydeon here!

I do nerd-stuff to feed the wallet, relatable? I live in Cebu City, but most of the time inside the computer. Frequently doing Python, Analytics, ML, and always coffee. I've been to blockchains and cryptocurrencies for some time already, but it would be dumb and risky to share unreliable financial advice. So, don't ask me.

Thinking of following? I'll gonna resume writing about time-waster games, awesome technology, and the cafés I went to connect to their Wi-Fi. g2g...