Commit graph

15431 commits

Author SHA1 Message Date
Andras Bacsai
4575106f53 feat(sentinel): embed server UUID in encrypted sentinel token
Replace random string with encrypted JSON payload containing
server_uuid, binding token to its server for validation.
Remove double-encrypt test no longer relevant to new token format.
2026-04-30 08:21:30 +02:00
Andras Bacsai
3a42ceb67d Merge remote-tracking branch 'origin/next' into sentinel-token-recovery 2026-04-30 07:09:14 +02:00
Andras Bacsai
22569da738 Merge remote-tracking branch 'origin/v4.x' into next 2026-04-30 07:06:38 +02:00
Andras Bacsai
922950de59
chore(templates): sync service-templates from next (#9884) 2026-04-30 07:05:35 +02:00
Andras Bacsai
51d6795eeb chore(templates): sync service-templates from next
Pulls latest service-templates JSON files from `next` so cloud's hourly
PullTemplatesFromCDN job picks up queued template fixes (Jitsi, Plane,
Cap, Beszel, Langfuse, Twenty, Cal.com, etc.).

`templates/**` is in `paths-ignore` of coolify-production-build.yml so
no image rebuild triggered.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-30 07:04:12 +02:00
ShadowArcanist
13a1f86b5b
fix(notifications): set default SMTP encryption value to prevent false validation error (#9543) 2026-04-29 19:05:14 +02:00
Emmanuel Odinfono
e77e0761db
fix(backup): add .dmp to allowed extensions for database import (#9869) 2026-04-29 18:57:50 +02:00
Andras Bacsai
00d6e83e7f fix(sentinel): auto-regenerate invalid or undecryptable tokens
Replace hard validation error with self-healing token logic. Tokens that
are null, empty, or fail decryption are now regenerated automatically
rather than crashing sentinel startup or metrics reads.

Token format changed from encrypted JSON payload to a plain 64-char
random string (Str::random), eliminating double-encryption issues and
simplifying the validation regex to cover the new character set.

New `ensureValidSentinelToken()` method on ServerSetting centralises
the get-or-regenerate contract; both StartSentinel and HasMetrics now
delegate to it. HasMetrics logs a warning when regeneration occurs so
operators know a sentinel container restart is required.

`isValidSentinelToken()` now accepts `?string` (null → false).

Adds feature tests covering: null/empty/undecryptable stored values,
idempotent return of valid tokens, RuntimeException only when
regeneration itself produces an invalid token, no double-encryption of
newly generated tokens, and cast round-trip consistency.
2026-04-29 16:44:12 +02:00
Andras Bacsai
3e76390194
fix(deployments): use app git_commit_sha when commit not explicitly set (#9865) 2026-04-29 11:02:50 +02:00
Andras Bacsai
6d1d699595 fix(deployments): resolve commit from app git_commit_sha when not explicitly set
Change `commit` param from `string 'HEAD'` default to `?string null`, then
resolve priority: explicit param > app `git_commit_sha` > `'HEAD'` fallback.

Add feature tests covering all four resolution paths.
2026-04-29 10:59:32 +02:00
Andras Bacsai
5f89f120a8
docs(design): migrate design system from .ai/ to DESIGN.md (#9863) 2026-04-29 10:43:57 +02:00
Andras Bacsai
ec6407a71f docs(design): migrate design system from .ai/ to DESIGN.md
Condense verbose 1666-line AI reference into 752-line structured
YAML/Markdown spec. Move from .ai/design-system.md to repo-root
DESIGN.md for broader visibility.
2026-04-29 10:43:19 +02:00
Andras Bacsai
f8755261ba
feat(webhook): skip deployment on [skip ci]/[skip cd] commit markers (#9861) 2026-04-29 09:16:12 +02:00
Andras Bacsai
46180dbbf9 feat(webhook): skip deployment on [skip ci]/[skip cd] commit markers
Add DetectsSkipDeployCommits trait with two strategies: shouldSkipDeploy
(all commits must contain the marker) for push events, and
shouldSkipDeployAny (any single marker triggers skip) for PR/MR titles
and latest-commit signals.

Apply trait to Bitbucket, Gitea, GitHub, GitLab webhook controllers and
ProcessGithubPullRequestWebhook job. PRs pass pullRequestTitle through
to the job constructor for evaluation.
2026-04-29 09:12:24 +02:00
Andras Bacsai
33f5cbb7d7 chore(version): bump version to 4.1.0 2026-04-29 08:58:45 +02:00
Andras Bacsai
9af0351144
fix(storages): block UI editing of file volumes exceeding 5 MiB (#9851) 2026-04-28 22:41:37 +02:00
Andras Bacsai
eaaf258f25 fix(service): block UI editing of file volumes exceeding 5 MiB
Large host files mounted via Docker volumes caused the storages page to
become unusable — full file content was stored in the encrypted mediumText
column and serialised into the Livewire payload, crashing the browser.

- Add MAX_CONTENT_SIZE (5 MiB), BINARY_PLACEHOLDER, and TOO_LARGE_PLACEHOLDER
  constants to LocalFileVolume
- Check remote file size via stat/wc before cat in loadStorageOnServer and
  saveStorageOnServer; store placeholder instead of content when limit exceeded
- Expose is_too_large computed attribute (appended for Livewire serialisation)
- Guard submit, instantSave, and syncData in FileStorage Livewire component
- Truncate oversized content in Storage::refreshStorages to prevent payload bloat
- Show distinct warning banner in file-storage blade; mark textarea readonly and
  hide Save/Convert buttons for too-large files
- Add unit tests covering constants, computed flags, and toArray serialisation

Fixes #4701
2026-04-28 22:36:56 +02:00
Andras Bacsai
6c54f33167 Merge remote-tracking branch 'origin/next' into next 2026-04-28 22:25:49 +02:00
Andras Bacsai
092ea3bb7f
feat(server): add configurable SSH connection timeout per server (#9844) 2026-04-28 22:25:36 +02:00
Andras Bacsai
19994a0a13 test(api): add feature tests for server connection_timeout API
Tests cover PATCH update success, out-of-range, above-max, and
non-integer validation for the connection_timeout field.
2026-04-28 22:20:15 +02:00
Andras Bacsai
e8dc48e058 fix(vite): make dev server host/port configurable via env vars
Replace hardcoded HMR host with VITE_HOST/VITE_PORT env vars.
Set allowedHosts to true and derive origin/HMR config from env,
falling back to defaults when vars are absent.
2026-04-28 22:06:20 +02:00
Andras Bacsai
9bb819c33e feat(api): expose connection_timeout in servers API
Add connection_timeout to create_server docs, update_server allowed
fields, validation (integer 1-300), and advanced settings update path.
2026-04-28 15:43:58 +02:00
Andras Bacsai
4a2e37e87f chore(dev): replace minio image with maxio:latest in docker-compose.dev 2026-04-28 15:41:04 +02:00
Andras Bacsai
6293b14586 feat(server): add configurable SSH connection timeout per server
Add `connection_timeout` field to server settings, allowing per-server
override of the global SSH connection timeout constant.

- Migration adds `connection_timeout` integer column (default 10s)
- `ServerSetting` model exposes and casts the new field
- `SshMultiplexingHelper::getConnectionTimeout()` resolves per-server
  value with fallback to `constants.ssh.connection_timeout`
- All SSH/SCP command builders use the new resolver instead of the
  global config directly
- Livewire `Show` component binds `connectionTimeout` with validation
  (1–300 seconds) and syncs to/from the model
- UI input added to server settings form with helper text
- Feature tests cover default, persistence, resolver, and fallback
2026-04-28 15:39:36 +02:00
Andras Bacsai
255c21ddc1
fix(server): reliably dispatch reachability notifications via event (#9843) 2026-04-28 15:34:22 +02:00
Andras Bacsai
b8226be774 refactor(server): dispatch event for reachability notifications, drop retry loop
Move reachability notification triggering out of isReachableChanged into
a dedicated ServerReachabilityChanged event dispatched by
ServerConnectionCheckJob. Remove the blocking 3-attempt sleep loop from
isReachableChanged — unreachable_count threshold alone now gates the
Unreachable notification. Add feature and unit tests covering all
notification dispatch paths.
2026-04-28 15:28:22 +02:00
Andras Bacsai
cf13d40178 version++ 2026-04-28 15:27:53 +02:00
Andras Bacsai
5c89a707cf
feat(observability): add structured audit log channel for API and webhook events (#9842) 2026-04-28 14:52:47 +02:00
Andras Bacsai
a2096c6f68 feat(observability): add structured audit log channel for API and webhook events
Introduce a dedicated `audit` log channel (daily rotation, configurable retention via
LOG_AUDIT_DAYS) and a small `auditLog()` / `auditLogWebhookFailure()` helper used to
record state-changing API operations and webhook events.

Instrumented:

- API mutation endpoints (create / update / delete / start / stop / restart) across
  applications, services, databases (incl. backups, env vars, storage), servers,
  projects + environments, scheduled tasks, private keys, GitHub apps, cloud provider
  tokens, Hetzner server provisioning, instance enable/disable.
- Webhook signature verification outcomes for GitHub, GitLab, Bitbucket, Gitea and
  Stripe, plus the Sentinel push endpoint.
- Authentication and authorization outcomes via the global exception handler and
  the `ApiAbility` middleware (unauthenticated, ability-denied, policy-denied).

The helper is wrapped in try/catch so logging failures never affect the request
path. Successful operations log at `info`; suspicious/denied requests log at
`warning`. Operators wanting a failures-only feed can set `LOG_AUDIT_LEVEL=warning`.

Includes a feature test suite covering the helper, the webhook providers and the
new auth/authorization log paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 14:50:37 +02:00
Andras Bacsai
81510e5f6b Update versions.json 2026-04-28 14:50:30 +02:00
Andras Bacsai
fbed9063d8
build(deps): bump follow-redirects from 1.15.11 to 1.16.0 in /docker/coolify-realtime (#9690) 2026-04-28 14:30:21 +02:00
Andras Bacsai
923525a310
fix: use --network host for Dockerfile buildpack builds (#9811) 2026-04-28 13:16:14 +02:00
Andras Bacsai
268c97d18f
fix(validation): allow decimals for database backups max storage (#9801) 2026-04-28 12:33:00 +02:00
Andras Bacsai
1368026f20 fix(terminal): remove verbose websocket message logging 2026-04-28 12:29:32 +02:00
Andras Bacsai
cabcd8f699 fix(terminal): add idle timeout, reconnect replay, and scrollback preservation
- Kill PTY and notify client after 30 min of inactivity (IDLE_TIMEOUT_MS)
- Buffer client messages during async auth/IP fetch to prevent race-condition
  message loss on fast reconnects
- Replay last sent command after transient reconnect so PTY respawns without
  user interaction
- Preserve scrollback on disconnect/reconnect; write visible timestamp markers
  instead of wiping term state
- Handle idle-timeout sentinel on client with user-facing error message
2026-04-28 12:26:31 +02:00
Andras Bacsai
9408620d5f fix(terminal): add WS heartbeat and fix proxy idle disconnects
Proxies (Cloudflare, nginx) drop idle WebSocket connections before the
application notices, leaving clients typing into dead sockets.

- Add server-side ping/pong heartbeat (30s) in terminal-server.js;
  terminate unresponsive clients instead of letting connections go stale
- Move client keepAlive interval start to the connect event so it
  restarts correctly after reconnects
- Remove hidden-tab keepalive short-circuit — server pings now own
  liveness; suppressing client pings while hidden masked proxy drops
- Fix clearAllTimers to use clearTimeout for one-shot timers
- On visibility resume, probe with a 5s timeout instead of the default
  35s so half-open sockets are detected quickly
- Bump coolify-realtime to 1.0.14 across all compose files
2026-04-28 10:35:32 +02:00
Andras Bacsai
9a58e0fea2 fix(logs): disable auto-scroll on user scroll-up, re-enable on scroll-to-bottom
Add wheel, touch, and keyboard event handlers to log containers in
deployment and get-logs views. Auto-follow disables when user scrolls
up; re-enables when user scrolls back to bottom (within 10px threshold).
2026-04-28 10:33:08 +02:00
Andras Bacsai
f2ac6da98e
fix: normalize oauth emails before matching users (#9488) 2026-04-27 15:28:41 +02:00
Andras Bacsai
b4e139929e Merge remote-tracking branch 'origin/next' into fix/oauth-email-normalization 2026-04-27 14:56:16 +02:00
Andras Bacsai
96bfc14543
v4.0.0 (#9818) 2026-04-27 10:51:15 +02:00
Andras Bacsai
d0ed4fa4c4 version ++ finally 2026-04-27 09:09:01 +02:00
Andras Bacsai
8deb19e5e4
fix(service): rally invalid next public url (#9041) 2026-04-27 09:08:04 +02:00
Andras Bacsai
e1a295ac6c
fix(service): add missing database alteration step for Logto latest image (#9376) 2026-04-27 09:07:53 +02:00
Andras Bacsai
5a4f79441c
fix(service): Jitsi Meet doesn't work (#9594) 2026-04-27 09:06:57 +02:00
Andras Bacsai
349e9289ad
fix(service): twenty fails to deploy due to dependency unhealthy (#9603) 2026-04-27 09:06:41 +02:00
Andras Bacsai
43b8304e02
feat(service): enable plane (#9641) 2026-04-27 09:06:32 +02:00
Andras Bacsai
e9a9a32e87
feat(services): add Cap to templates (#9729) 2026-04-27 09:06:09 +02:00
Andras Bacsai
3f736b5afd
feat(service): add healthcheck to langfuse-worker (#9772) 2026-04-27 09:05:38 +02:00
Andras Bacsai
66ce3009a3
chore(service): update beszel to 0.18.7 (#9775) 2026-04-27 09:05:22 +02:00
Andras Bacsai
d131066701
feat(service): disable calcom (#9776) 2026-04-27 09:04:56 +02:00