Giter VIP home page Giter VIP logo

streamlit-heroku's Introduction

Prerequisites ๐Ÿ“ƒ

  1. Docker ๐Ÿณ
  2. cURL or something that can make a patch HTTP request
  3. Heroku Account
  4. Free time. ๐Ÿ˜

Steps ๐Ÿ”จ

1. Build and play with your docker image locally

docker-compose up --build

2. Create a heroku app

  1. Login to heroku
  2. Click on this

create-new-app

  1. Enter your app name

enter-app-name

We will call the app name <APP_NAME> from this point

3. Tag your image in this format

docker tag streamlit-docker registry.heroku.com/<APP_NAME>/web

replace "streamlit-docker" to your new image name if you have changed image name in docker-compose.yml

4. Get Heroku Oauth token

  1. Login to heroku
  2. Go to account settings

login

  1. Scroll down click on Reveal and Get your Oauth token

get-token

We will call it <API_KEY> from this point

5. Get your Image Id

docker inspect --format="{{.Id}}" registry.heroku.com/<APP_NAME>/web

Psst. Its not IMAGE_NAME !

It looks something like this

sample-image-id

5. Login with your API_KEY to heroku container registry

docker login --username=_ --password=<API_KEY> registry.heroku.com

Yes the username is underscore !

6. Push the image to heroku container registry

docker push registry.heroku.com/<APP_NAME>/web

7. Trigger a deployment with cURL or requests or whatever you want.

curl --netrc -X PATCH https://api.heroku.com/apps/<APP_NAME>/formation \
  -d '{
  "updates": [
    {
      "type": "web",
      "docker_image": "<IMAGE_ID>"
    }
  ]
}' \
  -H "Content-Type: application/json" \
  -H "Accept: application/vnd.heroku+json; version=3.docker-releases"\
  -H "Authorization: Bearer <API_KEY>"

8. Go to https://<APP_NAME>.herokuapp.com and we are done with deployment. ๐ŸŽ‰๐ŸŽ‰

streamlit-heroku's People

Contributors

ash2shukla avatar badayvedat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

streamlit-heroku's Issues

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.