updated deploymentfiles
This commit is contained in:
29
deploy/signalplatform.service
Normal file
29
deploy/signalplatform.service
Normal file
@@ -0,0 +1,29 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user