LoginSignup
5
2

More than 3 years have passed since last update.

gunicornをバックグラウンドで実行する方法

Last updated at Posted at 2019-07-12

個人開発として作成しているOwntimeのCD(継続的デリバリー)を実装する際に、 gunicornをバックグラウンドで起動する 必要がありました。

gunicornのバックグラウンド実行に関する記事が少なかったですが、やり方は簡単です。

# 「-D」のオプションを付けるだけ!
$ gunicorn owntime.wsgi -D

これで無事、バックグラウンドで実行されます!

プロセスをkillするときは、

$ ps aux | grep gunicorn
# => プロセスidを調べる

$ kill {プロセスid}

これで、バックグラウンド実行したプロセスを停止することができます。

おまけ

今回紹介したgunicornを使って開発しているのが、Owntimeです
毎日の時間の使い方を記録して、分析して、理想な時間の使い方に近づけるサポートをするサービスです。

ぜひ、一度使ってみてください!

5
2
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
5
2