Refactor systemd service config to use environment variables
• Add LIGHTRAG_HOME environment variable • Use .venv instead of venv directory
This commit is contained in:
parent
6dc027cb75
commit
0fa2fc9cab
1 changed files with 8 additions and 5 deletions
|
|
@ -9,11 +9,14 @@ User=netman
|
|||
MemoryHigh=8G
|
||||
MemoryMax=12G
|
||||
|
||||
# Using virtual enviroment created by miniconda
|
||||
Environment="PATH=/home/netman/miniconda3/bin:/home/netman/lightrag-xyj/venv/bin"
|
||||
WorkingDirectory=/home/netman/lightrag-xyj
|
||||
# ExecStart=/home/netman/lightrag-xyj/venv/bin/lightrag-server
|
||||
ExecStart=/home/netman/lightrag-xyj/venv/bin/lightrag-gunicorn
|
||||
# Set the LightRAG installation directory (change this to match your installation path)
|
||||
Environment="LIGHTRAG_HOME=/home/netman/lightrag-xyj"
|
||||
|
||||
# Set Environment to your Python virtual environment
|
||||
Environment="PATH=${LIGHTRAG_HOME}/.venv/bin"
|
||||
WorkingDirectory=${LIGHTRAG_HOME}
|
||||
ExecStart=${LIGHTRAG_HOME}/.venv/bin/lightrag-server
|
||||
# ExecStart=${LIGHTRAG_HOME}/.venv/bin/lightrag-gunicorn
|
||||
|
||||
# Kill mode require ExecStart must be gunicorn or unvicorn main process
|
||||
KillMode=process
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue