Commit graph

820 commits

Author SHA1 Message Date
Andras Bacsai
90aa4e7e73 chore(sentinel): remove stale resource exit check 2026-05-27 16:55:03 +02:00
Andras Bacsai
626cfb4a22 fix(sentinel): reduce resource churn from health flaps
Ignore health status changes in Sentinel push deduplication when the container lifecycle state is unchanged.

Scope stale resource checks to Sentinel servers whose heartbeat is stale, and avoid refreshing resource last_online_at on unchanged statuses.
2026-05-27 16:48:38 +02:00
Andras Bacsai
b751628545 fix(database): normalize read/write host lists
Trim comma-separated database host values and fall back to DB_HOST or the default host when write hosts are empty. Add unit coverage for read/write host parsing.
2026-05-26 14:52:25 +02:00
Andras Bacsai
43884823c6 chore(ssh): remove stale mux cleanup job
Drop the scheduled stale multiplexed connection cleanup job, its SSH mux
health/orphan config, and the tests that covered that cleanup path.
2026-05-26 14:40:38 +02:00
Andras Bacsai
ffe8cfd76f fix(changelog): use configurable GitHub releases source
Default changelog pulls to the GitHub raw releases JSON and cover the
configured URL, file writing, and draft-release filtering with feature tests.
2026-05-22 18:39:37 +02:00
Andras Bacsai
57d879263d fix(ssh): prevent orphaned multiplexed connections
Serialize multiplexed SSH master creation per server to avoid concurrent workers spawning orphaned processes. Enable scheduled cleanup for stale mux connections and add guarded orphan process reaping with tests.
2026-05-22 17:31:38 +02:00
Andras Bacsai
283795ba94 version++ 2026-05-22 14:00:54 +02:00
Andras Bacsai
36526928df feat(sentinel): deduplicate metrics push processing
Move Sentinel push handling into a controller and dispatch server update jobs only when container state changes or the force interval elapses. Add opt-in PostgreSQL read/write replica configuration and tune periodic proxy network and storage checks to reduce unnecessary work.

Add feature coverage for replica config, Sentinel push deduplication, deployment log scrolling, and server update job optimizations.
2026-05-22 12:48:48 +02:00
Andras Bacsai
7056a1cae1 chore(helper): bump railpack and mise versions 2026-05-13 10:50:50 +02:00
Andras Bacsai
c8185c8336 fix(realtime): replace axios with native HTTP client
Remove axios from the realtime server dependencies to avoid header injection risk,
switch Docker builds to npm ci, and bump the realtime image version to 1.0.15.
2026-05-11 21:43:52 +02:00
Andras Bacsai
ec71d33f5e fix(railpack): pin frontend image version via config constant
Remove RAILPACK_FRONTEND_IMAGE env var from helper Dockerfile and resolve
the image ref at runtime using a new `railpack_version` constant in config.
Eliminates Docker build-time env interpolation for BUILDKIT_SYNTAX arg.
2026-04-30 16:27:08 +02:00
Andras Bacsai
33f5cbb7d7 chore(version): bump version to 4.1.0 2026-04-29 08:58:45 +02:00
Andras Bacsai
cf13d40178 version++ 2026-04-28 15:27:53 +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
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
d0ed4fa4c4 version ++ finally 2026-04-27 09:09:01 +02:00
Andras Bacsai
968ae97dfc version++ 2026-04-27 09:01:36 +02:00
peaklabs-dev
15cb9446ff
chore(swarm): mark docker swarm as deprecated 2026-04-17 23:41:39 +02:00
Andras Bacsai
df5a9e9ba3 chore(version): bump Coolify to 4.0.0-beta.474
Update the app version constant and synced version manifests for the latest beta release.
2026-04-14 11:29:50 +02:00
Andras Bacsai
60f76380bd build(realtime): bump coolify-realtime to 1.0.13
Update the realtime service version constant and Docker Compose image tags,
including nightly and Windows variants.
2026-04-13 10:21:01 +02:00
Andras Bacsai
6bfc289ec5 chore(release): bump version to 4.0.0-beta.473 2026-04-09 17:50:16 +02:00
Andras Bacsai
92d1168228 chore: bump version to 4.0.0-beta.472 2026-04-09 12:13:39 +02:00
Andras Bacsai
4d8a5ba40f fix(security): bump helper and realtime versions across manifests
Update helper to 1.0.13 and realtime to 1.0.12 in constants,
version manifests, and production/windows docker compose files,
including nightly variants.
2026-04-05 18:32:05 +02:00
Andras Bacsai
103d5b6c06 fix: sanitize error output in server validation logs
Escape dynamic error messages with htmlspecialchars() before
concatenating into HTML strings stored in validation_logs. Add a
Purify-based mutator on Server model as defense-in-depth, with a
dedicated HTMLPurifier config that allows only safe structural tags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 18:36:36 +01:00
Andras Bacsai
ca769baf17 chore: bump version to 4.0.0-beta.471 2026-03-25 13:25:41 +01:00
Andras Bacsai
bf306ffad3 chore: bump version to 4.0.0-beta.470 2026-03-24 21:57:40 +01:00
Andras Bacsai
c09d7e412e feat(monitoring): add Laravel Nightwatch monitoring support
- Install laravel/nightwatch package for application monitoring
- Create Nightwatch console command to start the monitoring agent
- Add NIGHTWATCH_ENABLED and NIGHTWATCH_TOKEN environment variables
- Configure nightwatch settings in config/constants.php
- Set up Docker s6-overlay services for both development and production
- Disable Nightwatch by default in test environment
2026-03-23 15:36:47 +01:00
Andras Bacsai
f8f27fff13 refactor(scheduler): extract cron scheduling logic to shared helper
Extract the shouldRunNow() method from ScheduledJobManager and ServerManagerJob into
a reusable shouldRunCronNow() helper function. This centralizes cron scheduling logic
and enables consistent deduplication behavior across all scheduled job types.

- Create shouldRunCronNow() helper in bootstrap/helpers/shared.php with timezone
  and dedup support
- Refactor ScheduledJobManager and ServerManagerJob to use the shared helper
- Add ScheduledJobDiagnostics command for inspecting cache state and scheduling
  decisions across all scheduled jobs
- Simplify shouldRunNow tests to directly test the helper function
- Add DockerCleanupJob test for error handling and execution tracking
- Increase scheduled log retention from 1 to 7 days
2026-03-23 10:37:49 +01:00
Andras Bacsai
21ed8fd300 version++ 2026-03-12 15:10:12 +01:00
Andras Bacsai
fd6ac4ef9d version++ 2026-03-12 13:26:59 +01:00
Andras Bacsai
b926f23824 version++ 2026-03-11 12:01:02 +01:00
Andras Bacsai
babc9ff658 chore(release): bump version to 4.0.0-beta.466 2026-03-11 07:10:32 +01:00
Andras Bacsai
1d3dfe4dc8 chore(version): bump coolify, realtime, and sentinel versions 2026-03-10 20:40:49 +01:00
Andras Bacsai
d2744e0cff fix(database): handle PDO constant name change for PGSQL_ATTR_DISABLE_PREPARES
Support both the older PDO::PGSQL_ATTR_DISABLE_PREPARES and newer
Pdo\Pgsql::ATTR_DISABLE_PREPARES constant names to ensure compatibility
across different PHP versions.
2026-03-03 09:04:45 +01:00
Andras Bacsai
d71d91d63e fix(version): update coolify version to 4.0.0-beta.464 and nightly version to 4.0.0-beta.465 2026-02-23 13:47:26 +01:00
Andras Bacsai
b7b0dfeddd chore: prepare for PR 2026-02-23 13:24:49 +01:00
Andras Bacsai
47a3f2e2cd test: add Pest browser testing with SQLite :memory: schema
Set up end-to-end browser testing using Pest Browser Plugin + Playwright.
New v4 test suite uses SQLite :memory: database with pre-generated schema dump
(database/schema/testing-schema.sql) instead of running migrations, enabling
faster test startup.

- Add pestphp/pest-plugin-browser dependency
- Create GenerateTestingSchema command to export PostgreSQL schema to SQLite
- Add .env.testing configuration for isolated test environment
- Implement v4 test directory structure (Feature, Browser, Unit tests)
- Update Pest skill documentation with browser testing patterns, API reference,
  debugging techniques, and common pitfalls
- Configure phpunit.xml and tests/Pest.php for v4 suite
- Update package.json and docker-compose.dev.yml for testing dependencies
2026-02-11 15:25:47 +01:00
peaklabs-dev
4c3253fdf8
chore: bump coolify version 2026-02-04 18:39:02 +01:00
Andras Bacsai
b971440202 fix: update version numbers to 4.0.0-beta.462 and 4.0.0-beta.463 2026-01-16 12:03:31 +01:00
Andras Bacsai
3eacaa325b fix: make PgBouncer prepared statement disabling configurable
Use PDO::PGSQL_ATTR_DISABLE_PREPARES with DB_DISABLE_PREPARES env variable
to prevent "cached plan must not change result type" errors during rolling
deployments with PgBouncer. Defaults to false for normal operation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 13:16:28 +01:00
Andras Bacsai
84c89a83b8 fix: disable prepared statements for PgBouncer compatibility
Add PDO::ATTR_EMULATE_PREPARES option to prevent "cached plan must not
change result type" errors during rolling deployments with PgBouncer.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 12:04:09 +01:00
Andras Bacsai
7e73058b0a chore: update versions.json for consistency across environments 2026-01-02 17:10:50 +01:00
Andras Bacsai
42633ddc52 fix: update version numbers to 4.0.0-beta.460 and 4.0.0-beta.461 2025-12-31 11:07:04 +01:00
Andras Bacsai
c98f947a0c fix: Update version numbers to 4.0.0-beta.459 and 4.0.0-beta.460 2025-12-23 15:22:39 +01:00
Andras Bacsai
d901306e86 Bump version to 4.0.0-beta.458 and update nightly version to 4.0.0-beta.459 2025-12-18 13:22:08 +01:00
Andras Bacsai
f53027a0a3 chore: update version numbers to 4.0.0-beta.457 and 4.0.0-beta.458 2025-12-18 10:26:27 +01:00
Andras Bacsai
aaa72be58a Bump version to 4.0.0-beta.456 and update nightly version to 4.0.0-beta.457 2025-12-17 11:05:01 +01:00
Andras Bacsai
51ed9b390d Change default session driver from Redis to database
Fixes intermittent 419 "Page Expired" errors on login/logout caused by
a race condition with Redis sessions. Database sessions are synchronous
and don't have this issue.

Users can still use Redis sessions by setting SESSION_DRIVER=redis.

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-16 12:11:59 +01:00
Andras Bacsai
de59096c9d
Bump version to v455 (#7601)
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-12 11:21:54 +01:00
Andras Bacsai
25e295e627 Bump version to 4.0.0-beta.454 2025-12-09 16:15:55 +01:00