30 lines
815 B
Desktop File
30 lines
815 B
Desktop File
# systemd service for signalplatform
|
|
#
|
|
# Installation:
|
|
# sudo cp deploy/signalplatform.service /etc/systemd/system/
|
|
# sudo systemctl daemon-reload
|
|
# sudo systemctl enable signalplatform
|
|
# sudo systemctl start signalplatform
|
|
#
|
|
# Customize:
|
|
# - User/Group: create with `sudo useradd -r -s /usr/sbin/nologin stockdata`
|
|
# - WorkingDirectory: adjust if installed elsewhere
|
|
# - EnvironmentFile: ensure .env exists at the specified path
|
|
|
|
[Unit]
|
|
Description=Stock Data Backend
|
|
After=network.target postgresql.service
|
|
|
|
[Service]
|
|
Type=exec
|
|
User=deploy
|
|
Group=deploy
|
|
WorkingDirectory=/opt/signalplatform
|
|
EnvironmentFile=/opt/signalplatform/.env
|
|
ExecStart=/opt/signalplatform/.venv/bin/uvicorn app.main:app --host 127.0.0.1 --port 8998 --workers 1
|
|
Restart=always
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|