mirror of
https://github.com/Cccc-owo/CheckInApp.git
synced 2026-06-17 14:06:28 +00:00
deploy: fix service example
This commit is contained in:
@@ -29,6 +29,8 @@ Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
# CHANGE THIS: Replace with your actual username
|
||||
User=username
|
||||
|
||||
# CHANGE THIS: Replace with your actual installation path
|
||||
# Example: /home/username/CheckInApp
|
||||
@@ -44,8 +46,8 @@ ExecStart=/path/to/CheckInApp/manage.sh start backend
|
||||
ExecStop=/path/to/CheckInApp/manage.sh stop backend
|
||||
|
||||
# Restart policy
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
Restart=on-failure
|
||||
RestartSec=10s
|
||||
|
||||
# Kill settings
|
||||
KillSignal=SIGTERM
|
||||
|
||||
+5
-2
@@ -41,19 +41,22 @@ server {
|
||||
# ==========================================
|
||||
location /api/ {
|
||||
# Proxy to backend FastAPI server
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_pass http://localhost:8000/api/;
|
||||
|
||||
# Proxy headers
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Host $host:$server_port;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $host:$server_port;
|
||||
|
||||
# HTTP version and buffering
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
proxy_redirect off;
|
||||
|
||||
# Timeouts
|
||||
proxy_connect_timeout 60s;
|
||||
proxy_send_timeout 60s;
|
||||
|
||||
Reference in New Issue
Block a user