Initial TodoList MySQL delivery

This commit is contained in:
2026-07-16 15:42:31 +08:00
commit fb0a53676f
11 changed files with 723 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/todolist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
location /api/ {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
+15
View File
@@ -0,0 +1,15 @@
[Unit]
Description=TodoList FastAPI service
After=network.target
[Service]
Type=simple
User=dwh
WorkingDirectory=/home/dwh/code/fastapi_todolist
ExecStart=/home/dwh/code/fastapi_todolist/.venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000
Restart=always
RestartSec=3
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=multi-user.target