thread-master/deploy/prod/systemd/harbor-crawler.service

30 lines
702 B
SYSTEMD

[Unit]
Description=Harbor Scout Chrome crawler
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=harbor
Group=harbor
EnvironmentFile=/etc/harbor/harbor.env
Environment=HOME=/var/lib/harbor
Environment=SCOUT_CRAWLER_PORT=8891
Environment=PLAYWRIGHT_BROWSERS_PATH=/var/lib/harbor/.cache/ms-playwright
WorkingDirectory=/opt/harbor/crawler
ExecStart=/usr/bin/npx tsx src/server.ts
Restart=on-failure
RestartSec=3
TimeoutStopSec=60
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/harbor /opt/harbor/crawler
StandardOutput=journal
StandardError=journal
SyslogIdentifier=harbor-crawler
[Install]
WantedBy=multi-user.target