.
├── Procfile
├── README.md
├── main.py
├── requirements.txt
└── runtime.txt
$ pip3 install -r requirements.txt # or make install
$ uvicorn main:app --reload # or make run
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Create a Heroku account
$ brew tap heroku/brew && brew install heroku
$ heroku login
$ heroku create <app-name>
$ git init
$ git add .
$ git commit -m "<commit-message>"
$ heroku git:remote -a <app-name>
$ git push heroku master
Before use, enter the application name created with the heroku create
command in the app_name
variable.
$ make
Commit messages can be used by doing the following
$ make message="first commit" # or make commit
VARIABLE_NAME='***************'
$ pip3 install python-dotenv
import os
from dotenv import load_dotenv
load_dotenv()
VARIABLE_NAME = os.getenv("VARIABLE_NAME")
# ...
Makefile
commit:
git add . && \
+ git rm --cached -r .gitignore && \
git commit -m "$(message)" && \
heroku git:remote -a $(app_name) && \
git push heroku master