From 5934db54cae46a580c63aecce2b7de5c46299453 Mon Sep 17 00:00:00 2001 From: chendelin1982 Date: Fri, 27 Aug 2021 18:27:28 +0800 Subject: [PATCH] init --- api/requirements.txt | 2 ++ deploy/stackhub.service | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 api/requirements.txt create mode 100644 deploy/stackhub.service diff --git a/api/requirements.txt b/api/requirements.txt new file mode 100644 index 00000000..f0615cfd --- /dev/null +++ b/api/requirements.txt @@ -0,0 +1,2 @@ +fastapi +uvicorn \ No newline at end of file diff --git a/deploy/stackhub.service b/deploy/stackhub.service new file mode 100644 index 00000000..4a14df4c --- /dev/null +++ b/deploy/stackhub.service @@ -0,0 +1,16 @@ +[Unit] +Description=My fastapi app +Requires=network.target +After=network.target + +[Service] +KillSignal=SIGQUIT +WorkingDirectory=/data/develop/stackhub/api +ExecStart=python3 uvicorn main:app --reload +Restart=always +Type=notify +NotifyAccess=all +StandardError=syslog + +[Install] +WantedBy=multi-user.target