platform-deployments/systemd/platform-analytics-api.service
2026-04-04 06:07:48 -07:00

36 lines
838 B
Desktop File

[Unit]
Description=Platform Analytics API - NestJS backend for analytics dashboards
Documentation=https://forge.nasty.sh/lilith/lilith-platform
After=network.target docker.service
Wants=docker.service
[Service]
Type=simple
User=lilith
Group=lilith
WorkingDirectory=/opt/lilith-platform/codebase/features/platform-analytics/backend-api
# Secrets loaded from environment file
EnvironmentFile=/opt/lilith-platform/secrets/platform-analytics-api.env
# Service registry needs the repo root
Environment=LILITH_PROJECT_ROOT=/opt/lilith-platform
# Execution — built NestJS dist
ExecStart=/usr/bin/node dist/main.js
Restart=always
RestartSec=10
# Security hardening
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
# Resource limits
LimitNOFILE=65536
MemoryMax=1G
CPUQuota=100%
[Install]
WantedBy=multi-user.target