Prajwalmithun / grossery_api

API for grossery shops to manage their items. Built using FastAPI python framework
1 stars 0 forks source link

Deploy the API on some SASS (heroku or GCP App Engine) #1

Open Prajwalmithun opened 2 years ago

Prajwalmithun commented 2 years ago

Manual Deployment to Heroku [Success]

Steps followed,

  1. FastAPI only supports only ASGI but not WSGI. Need to add UvicornWorker in Procfile
  2. Push the code to Github
  3. Create an heroku app in UI and then Login to Heroku CLI in terminal.
# heroku login

Get the auth token

# heroku auth:token

Push the code to heroku

# git remote add heroku https://heroku:<token>@git.heroku.com/<heroku-app>.git

* Deployment to heroku via Heroku [FAILED] ***** ERROR MESSAGE

Run git remote add heroku ***git.heroku.com/$HEROKU_APP_NAME.git
  git remote add heroku ***git.heroku.com/$HEROKU_APP_NAME.git
  git push heroku HEAD:main -f
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.4/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.4/x64/lib
    HEROKU_API_TOKEN: 
    HEROKU_APP_NAME: ***
    HEROKU_EMAIL: ***
remote: !   WARNING:
remote: !   Do not authenticate with username and password using git.
remote: !   Run `heroku login` to update your credentials, then retry the git command.
remote: !   See documentation for details: https://devcenter.heroku.com/articles/git#http-git-authentication
fatal: Authentication failed for 'https://git.heroku.com/***.git/'
Error: Process completed with exit code 1[2](https://github.com/Prajwalmithun/grossery_api/runs/5968116696?check_suite_focus=true#step:6:2)[8](https://github.com/Prajwalmithun/grossery_api/runs/5968116696?check_suite_focus=true#step:6:8).