2026-08-19 21:54:54 +07:00
|
|
|
[Unit]
|
|
|
|
|
Description=MCPedia indexing/embedding worker (BullMQ)
|
|
|
|
|
After=network-online.target redis.service
|
|
|
|
|
Wants=network-online.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
WorkingDirectory=/home/code/mcpedia
|
|
|
|
|
# Loads DATABASE_URL, REDIS_*, EMBED_* from the repo .env
|
|
|
|
|
# (.env is gitignored; for prod, point this at a deployed secret file).
|
|
|
|
|
EnvironmentFile=/home/code/mcpedia/.env
|
2026-08-20 09:38:32 +07:00
|
|
|
# Absolute bun path (systemd has a minimal PATH; /usr/bin/env bun fails).
|
|
|
|
|
ExecStart=/home/code/.bun/bin/bun --cwd apps/worker src/index.ts
|
2026-08-19 21:54:54 +07:00
|
|
|
Restart=on-failure
|
|
|
|
|
RestartSec=5
|
|
|
|
|
User=code
|
|
|
|
|
Group=code
|
|
|
|
|
NoNewPrivileges=true
|
|
|
|
|
PrivateTmp=true
|
|
|
|
|
MemoryMax=1G
|
|
|
|
|
TasksMax=256
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|