Since I started to do my personal projects, I figured out that storing the answers for might current doubts might be very useful later, when I have the same issues again. Sometimes I stuggle to find the answer I know I've found before. This gist will help with that and will be refered back on the projects that needs it!
When you start a new project with Heroku, the default stack might be the buildpack according to the files your repository have. Usually in my projects I like to use the Container Stack, so I can build the Dockerfile myself, that gives me control on the environment my application is working on. So, in order to fix that, I neet to run the command to change the default stack.
$ heroku stack:set container -a <app-name>To understand more what is going on, take a look at heroku documentation
Tox defaults itself to the setup.py file. Sometimes, the project I'm working on does not have a package creator file, that is the case when I'm working on APIs. In order to avoid that error, I followed the documentation by adding skipsdist=True under tox.ini tox subsection.
I noticed an error when shutting down the fastapi application. I found that was due to an broken process at uvicorn on version 0.15! Not sure the mistake was already fix now, but one can follow along the issue to make sure everything is right! A workaround is to downgrade to 0.14, where it is still ok!
After a quick look at stackoverflow I got the answer. Just run the command below.
$ export LD_LIBRARY_PATH=/usr/local/libSee more here.
Well, usually they said to add --network="host", but that exposes the entire container to the web which is not exactly what I want, but this reply is what I need! It worked just as I expected! Bellow is a Quote from it..
Set /etc/docker/daemon.json (file may not exist, which is not an issue) with,
{
"dns": ["8.8.8.8"]
}
and then restarting docker with, sudo service docker restart