fastapi-dls/.PKGBUILD/fastapi-dls.service
Oscar Krause 5e40d7944a PKGBUILD - updated service running uvicorn natively instead of calling main.py
- fixed issue with not loading env variables inside to fastapi
- fixed to not using "python main.py" which meant for development
2022-12-30 07:36:44 +01:00

16 lines
527 B
Desktop File

[Unit]
Description=FastAPI-DLS
Documentation=https://git.collinwebdesigns.de/oscar.krause/fastapi-dls
After=network.target
[Service]
Type=simple
AmbientCapabilities=CAP_NET_BIND_SERVICE
EnvironmentFile=/etc/default/fastapi-dls
ExecStart=/usr/bin/uvicorn main:app --proxy-headers --env-file=/etc/default/fastapi-dls --host=${LISTEN_IP} --port=${DLS_PORT} --app-dir=/opt/fastapi-dls --ssl-keyfile=${INSTANCE_SSL_KEY} --ssl-certfile=${INSTANCE_SSL_CERT}
Restart=on-abort
User=http
Group=http
[Install]
WantedBy=multi-user.target