- targets: Making Linebot deploying on a Heroku server.
- backends: Django
A pipeline is a group of Heroku apps that share the same codebase. Each app in a pipeline represents one of the following stages in a continuous delivery workflow:
- Development
- Review
- Staging
- Production
Pipelines are extremely useful for managing multiple environments for your app. A common pipeline workflow has the following steps:
- A developer creates a pull request to make a change to the codebase.
- Heroku automatically creates a review app for the pull request, allowing developers to test the change.
- When the change is ready, it’s merged into the codebase’s master branch.
- The master branch is automatically deployed to the pipeline’s staging app for further testing.
- When the change is ready, a developer promotes the staging app to production, making it available to the app’s end users.
-
Install
gunicorn
pip install gunicorn
-
Record all the required python dependencies in
requirements.txt
pip freeze > requirements.txt
-
Create a
Procfile
for the project
-
NOTICE: utf-8 encoding is necessary for this file.
echo "web: gunicorn {project_name}.wsgi" >> Procfile
-
Modify
setting.py
in the projectSTATIC_ROOT = os.path.join(BASE_DIR, 'static')
-
Login Heroku
heroku login
-
Deploy the project
git init git add . git commit -m "your_message" heroku git:remote -a {your_app_name} git push heroku main