`This is an article about macOS environment, but the procedure is the same for Windows environment. Please read and try the environment-dependent part. ``
After reading this article to the end, you will be able to:
No. | Overview | keyword |
---|---|---|
1 | Build Docker image/push | heroku container:push web |
2 | Release of Docker image | heroku container:release web |
environment | Ver. |
---|---|
macOS Catalina | 10.15.6 |
Python | 3.7.3 |
Heroku | 7.42.13 |
Docker | 19.03.12 |
Flask | 1.1.2 |
gunicorn | 20.0.4 |
Jinja2 | 2.11.2 |
Werkzeug | 1.0.1 |
I think that understanding will deepen if you read while actually following the implementation contents and source code. Please use it by all means.
command.sh
~% heroku container:login
command.sh
~% git clone https://github.com/nsuhara/heroku-docker.git -b master
tree.sh
heroku-docker
├── Dockerfile
├── docker-compose.yml
├── docker_compose_up.sh
└── webapp
├── app.py
├── requirements.txt
├── tests
│ ├── __init__.py
│ └── tests.py
└── wsgi.py
command.sh
~% cd heroku-docker
* This app name will be automatically generated
command.sh
~% heroku create
Creating app... done, ⬢ {app-name}
command.sh
~% heroku git:remote -a {app-name}
command.sh
~% heroku container:push web
command.sh
~% heroku container:release web
command.sh
~% heroku open
command.sh
~% sh docker_compose_up.sh
command.sh
~% open http://0.0.0.0:5000/
command.sh
~% python -B -m pylint --rcfile=.pylintrc -f parseable `find webapp -name "*.py" -not -path "webapp/tests"`
command.sh
~% python -B -m unittest discover tests
Recommended Posts