1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

AWS上のlinuxで動かしているflaskサーバーを半永続化(バックグラウンド実行)した日

Last updated at Posted at 2019-12-12

aws上のlinuxサーバー起動時、sshログインが切れるとサーバーが落ちちゃうので解消したい!

こんな感じで起動すればいいっぽい!

nohup COMMAND >out.log 2>err.log &

flaskファイルrun.pyを起動するときは以下のようにコマンドした。

nohup FLASK_APP=run.py FLASK_DEBUG=1 nohup flask run --host='0.0.0.0' --port=5000 >out.log 2>err.log &

参考

https://www.ukeyslabo.com/linux/ps-bg/
↓ほぼこちらの記事ママです
https://mick3355-dev.hatenablog.com/entry/2018/04/16/125133

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?