初始化 FastAPI HTTPS Hello World 服务

包含 FastAPI 应用、Nginx 反向代理配置、systemd 服务及腾讯云 pip 源配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ubuntu
2026-06-04 21:59:53 +08:00
co-authored by Cursor
commit 5313206976
7 changed files with 51 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
[Unit]
Description=Hair FastAPI Application
After=network.target
[Service]
Type=simple
User=ubuntu
WorkingDirectory=/home/ubuntu/hair
ExecStart=/home/ubuntu/hair/venv/bin/uvicorn app:app --host 127.0.0.1 --port 8000
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target