Summary
Deploy log modal currently shows a static snapshot. Logs do not update while a deployment is in progress.
Desired behavior
Logs stream in real-time while a deploy is running — new lines append as Coolify produces them.
Agreed approach — Option A (SSE)
Backend: New endpoint GET /api/sites/:slug/deployments/:id/log-stream
- Uses existing SSE pattern from
stats/live (same headers, keep-alive ping)
- Polls Coolify
getDeployment() every 1-2s
- Emits only delta (new lines since last emit) to avoid re-sending full log
Frontend: src/routes/sites/[slug]/+page.svelte (log modal, lines ~1862-1894)
- Connect
EventSource to the new endpoint when modal opens on a running deploy
- Append incoming lines to display instead of static render
- Close
EventSource when deploy reaches terminal state (success / failed)
Files to change
api/src/routes/sites.ts — add streaming endpoint after line ~1766
src/routes/sites/[slug]/+page.svelte — wire modal to EventSource
Notes
- Coolify direct log endpoint (
/api/v1/applications/{uuid}/logs) is blocked — COOLIFY_API_TOKEN env var is empty in current setup
- Client-side polling (Option B) was considered but rejected — wasteful for long deploys
Summary
Deploy log modal currently shows a static snapshot. Logs do not update while a deployment is in progress.
Desired behavior
Logs stream in real-time while a deploy is running — new lines append as Coolify produces them.
Agreed approach — Option A (SSE)
Backend: New endpoint
GET /api/sites/:slug/deployments/:id/log-streamstats/live(same headers, keep-alive ping)getDeployment()every 1-2sFrontend:
src/routes/sites/[slug]/+page.svelte(log modal, lines ~1862-1894)EventSourceto the new endpoint when modal opens on a running deployEventSourcewhen deploy reaches terminal state (success/failed)Files to change
api/src/routes/sites.ts— add streaming endpoint after line ~1766src/routes/sites/[slug]/+page.svelte— wire modal toEventSourceNotes
/api/v1/applications/{uuid}/logs) is blocked —COOLIFY_API_TOKENenv var is empty in current setup