lingyue-ner.service 827 B

12345678910111213141516171819202122232425262728293031323334
  1. [Unit]
  2. Description=Lingyue Zhibao - NER Python Service
  3. Documentation=https://code.salesmap.tech/hewensong/lingyue-zhibao
  4. After=network.target
  5. [Service]
  6. Type=simple
  7. User=root
  8. WorkingDirectory=/mnt/win_home/lingyue-zhibao/python-services/ner-service
  9. # 使用虚拟环境启动 (端口 18522)
  10. ExecStart=/mnt/win_home/lingyue-zhibao/python-services/ner-service/venv/bin/uvicorn \
  11. app.main:app \
  12. --host 0.0.0.0 \
  13. --port 18522
  14. # 重启策略
  15. Restart=always
  16. RestartSec=10
  17. # 日志
  18. StandardOutput=append:/var/log/lingyue/ner-service.log
  19. StandardError=append:/var/log/lingyue/ner-service-error.log
  20. # 环境变量
  21. Environment=NER_MODEL=rule
  22. Environment=LOG_LEVEL=INFO
  23. Environment=MAX_TEXT_LENGTH=50000
  24. # DeepSeek API (如需使用)
  25. # Environment=DEEPSEEK_API_KEY=your_api_key_here
  26. [Install]
  27. WantedBy=multi-user.target