Skip to content

Instantly share code, notes, and snippets.

@tianhuil
Created May 20, 2023 18:43
Show Gist options
  • Save tianhuil/867b7c4d9d2c68a1e272e05c06a0fd33 to your computer and use it in GitHub Desktop.
Save tianhuil/867b7c4d9d2c68a1e272e05c06a0fd33 to your computer and use it in GitHub Desktop.
Deploying to Heroku with a M1 Mac

From https://hackmd.io/@nirvana/deploy_python_m1

Build image with linux platform for heroku servers. Replace {NAME_OF_HEROKU_APP} with your own tag:

docker buildx build --platform linux/amd64 -t {NAME_OF_HEROKU_APP} .

Tag your app with the url for your apps registry. make sure to use the name of your Heroku app in the url and tag name:

docker tag {NAME_OF_HEROKU_APP} registry.heroku.com/{NAME_OF_HEROKU_APP}/web

Use docker to push the image to the Heroku container registry:

docker push registry.heroku.com/{NAME_OF_HEROKU_APP}/web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment