2026-05-15 17:05:13 -07:00
|
|
|
[Unit]
|
|
|
|
|
Description=Mac Sync Server
|
2026-06-29 19:47:18 -04:00
|
|
|
After=network.target redis-server.service
|
|
|
|
|
Wants=redis-server.service
|
2026-05-15 17:05:13 -07:00
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
2026-06-29 19:47:18 -04:00
|
|
|
# Runs as root on the backend droplet using the root-owned bun install — matches
|
|
|
|
|
# the other services on that host (no dedicated service user is provisioned).
|
|
|
|
|
User=root
|
2026-05-15 17:05:13 -07:00
|
|
|
WorkingDirectory=/opt/mac-sync-server
|
2026-06-29 19:47:18 -04:00
|
|
|
ExecStart=/root/.bun/bin/bun run src/main.ts
|
2026-05-15 17:05:13 -07:00
|
|
|
Restart=on-failure
|
|
|
|
|
RestartSec=5
|
|
|
|
|
Environment=NODE_ENV=production
|
|
|
|
|
EnvironmentFile=/etc/mac-sync-server/env
|
2026-06-29 19:47:18 -04:00
|
|
|
# journald on this droplet is volatile and captures nothing, so log to a file.
|
|
|
|
|
StandardOutput=append:/var/log/mac-sync-server.log
|
|
|
|
|
StandardError=append:/var/log/mac-sync-server.log
|
2026-05-15 17:05:13 -07:00
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|