0
0

More than 1 year has passed since last update.

RaspberryPi上でFlaskアプリをgunicornから本番環境として起動する

Posted at

本番用仮想環境

  1. ラズパイのOSをアップデートする。
sudo apt-get update
sudo apt-get upgrade
  1. 本番用仮想環境を作成する。deployという名前。
python -m venv deploy
source deploy/bin/activate

必要ライブラリのインストール

pip install flask
pip install gunicorn
pip install opencv-python
pip install requests

gunicornの起動

base.pyの中のappを起動する。
ポートは5000にした。

gunicorn -b :5000 base:app
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0