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]
|
[Unit]
|
||||||
Description=TodoList FastAPI service
|
Description=TodoList FastAPI service
|
||||||
After=network.target
|
After=network.target mysql.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=dwh
|
User=scaiuser
|
||||||
WorkingDirectory=/home/dwh/code/fastapi_todolist
|
WorkingDirectory=/home/scaiuser/dwh_apps/fastapi-todolist
|
||||||
ExecStart=/home/dwh/code/fastapi_todolist/.venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000
|
EnvironmentFile=/home/scaiuser/dwh_apps/fastapi-todolist/.env
|
||||||
Restart=always
|
ExecStart=/home/scaiuser/dwh_apps/fastapi-todolist/.venv/bin/uvicorn main:app --host 127.0.0.1 --port 8000
|
||||||
|
Restart=on-failure
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
Environment=PYTHONUNBUFFERED=1
|
Environment=PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user