825 B
825 B
PM2-guide
Tilbudsgivern kører som én samlet PM2-proces: tilbudgivern-unified.
Konfiguration
ecosystem.config.js starter backend/unified-server.js med:
- arbejdsmappe
backend/; NODE_ENV=production;- port
4032; - automatisk genstart;
- hukommelsesgrænse på 500 MB;
- logs under
.pm2/logs/.
Kommandoer
pm2 start ecosystem.config.js
pm2 status
pm2 show tilbudgivern-unified
pm2 logs tilbudgivern-unified --lines 100
pm2 restart tilbudgivern-unified
pm2 stop tilbudgivern-unified
Deploymentkontrol
npm run build
pm2 restart tilbudgivern-unified
curl http://localhost:4032/api/health
Kontrollér altid build-resultat, health-endpoint og PM2-logs efter genstart. Miljøhemmeligheder skal komme fra den godkendte serverkonfiguration og må ikke skrives i denne guide.