Skip to content

Instantly share code, notes, and snippets.

@igormcsouza
Last active June 16, 2023 16:21
Show Gist options
  • Select an option

  • Save igormcsouza/17282ec2189cb822a66a2d05e8d6800d to your computer and use it in GitHub Desktop.

Select an option

Save igormcsouza/17282ec2189cb822a66a2d05e8d6800d to your computer and use it in GitHub Desktop.
All the troubleshooting I'm doing on my packages.

Thoubleshoot

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!

Wrong Heroku Stack

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 could not find setup

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.

Shutdown process is broken

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!

Docker Compose Not Working With Gcloud

After a quick look at stackoverflow I got the answer. Just run the command below.

$ export LD_LIBRARY_PATH=/usr/local/lib

See more here.

Docker containers are not able to connect to internet.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment