Skip to content

khlodMohamed/gproject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

Prerequisites

  1. Docker 🐳
  2. install Heroku CLI
  3. Heroku Account

Structure

  1. Streamlit/Dockerfile
  2. fastapi/Dockerfile
  3. Docker-compose.yml "for local run"
  4. heroku.yml

Docker Compose

docker-compose.yml

  • uses ports num from .env file to run locally

Heroku

heroku.yml

  • uses Dockerfile.web instead of using streamlit/Dockerfile

How to RUN

1. Creat .env file

PORTStreamlit=8501
PORTFastapi=8000

2. Build and play with your docker containers locally

docker-compose up 
  • open localhost:8501

3. Create a heroku pipeline

  1. Login to heroku
  2. Creat new pipeline

create-new-pipeline

  1. Enter your pipeline name

enter-pipeline-name

  1. connect your pipeline with your github repo connect-github

4. Create a heroku app

  1. Click add app

add-app

  1. Enter your app name and click create new app

name-app

5. Deploy your app

  1. Go to Deploy tab deploy-tab

  2. Scroll down click on Deploy Branch
    deploy-branch

6. Go to <<https://<APP_NAME>.herokuapp.com>> and we are done with deployment. 🎉🎉