Add systemd and Caddy deployment configs
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
:8081 {
|
||||
handle_path /api/* {
|
||||
reverse_proxy 127.0.0.1:8000
|
||||
}
|
||||
|
||||
handle {
|
||||
root * /home/scaiuser/dwh_apps/fastapi-todolist/frontend
|
||||
file_server
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
[Unit]
|
||||
Description=TodoList FastAPI service
|
||||
After=network.target
|
||||
After=network.target mysql.service
|
||||
|
||||
[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
|
||||
User=scaiuser
|
||||
WorkingDirectory=/home/scaiuser/dwh_apps/fastapi-todolist
|
||||
EnvironmentFile=/home/scaiuser/dwh_apps/fastapi-todolist/.env
|
||||
ExecStart=/home/scaiuser/dwh_apps/fastapi-todolist/.venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user