[Unit] Description=Pushy API After=network-online.target Wants=network-online.target PartOf=pushy.target [Service] Type=simple User=root WorkingDirectory=/root Environment=NODE_ENV=production Environment=API_SLOT=primary Environment=API_CANDIDATE_UNIT=pushy-api-candidate.service Environment=API_LEGACY_PEER_UNIT=pushy-api-peer.service Environment=API_LEGACY_PEER_MIGRATION_MARKER=/run/pushy-rollout/legacy-peer Environment=API_WORKER_UNIT=pushy-worker.service Environment=API_5XX_EVENT_JOURNAL_UNIT=pushy-api.service Environment=DIAGNOSTIC_SOCKET_PATH=/run/pushy/metrics.sock ExecStart=/opt/pushy/runtime/bun --env-file=/root/.env.prod /opt/pushy/current/lib/index.js Restart=always RestartSec=3 TimeoutStopSec=30 KillMode=control-group OOMPolicy=stop OOMScoreAdjust=-500 RuntimeDirectory=pushy RuntimeDirectoryMode=0750 # Safe fallback for first boot. configure-host-memory.sh installs a host-sized # systemd drop-in that overrides these values before activation. MemoryHigh=512M MemoryMax=768M MemorySwapMax=384M LimitNOFILE=65536 SyslogIdentifier=pushy-api [Install] WantedBy=pushy.target