Commit Graph
537 Commits
Author SHA1 Message Date
Andras Bacsai 76030a30d4 chore(v5): archive V5 implementation and remove runtime integration
Move V5 source, migrations, UI, scripts, and tests into documentation, then remove V5 routes, models, jobs, configuration, dependencies, and application hooks.
2026-08-15 19:13:30 +02:00
8ae56587d5 feat(ui): Shadow UI redesign, domain management, and DNS autoconfigure (#11119)
Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com>
2026-08-03 23:11:54 +02:00
Andras Bacsai d0247d3b09 feat(v5): gate V5 to development environments only
Introduce V5Feature and config so V5 routes, jobs, commands, morph maps,
and model queries run only when enabled. Move V5 migrations to
migrations-v5 (loaded only when enabled), remove Flux from production
Docker/install paths, and add isolation tests.
2026-07-19 11:44:12 +02:00
Andras Bacsai ae32ab5d7b Merge remote-tracking branch 'origin/next' into v5-parallel-inertia-react 2026-07-18 15:57:26 +02:00
Andras Bacsai 2719d66042 feat: add ClickHouse backups and cloud ops tools
Enable scheduled ClickHouse backups across the job, API, and UI, and
guard unsupported database types via isBackupSolutionAvailable().
Convert Stripe subscription sync from a job to an action with clearer
discrepancy resolution, and add cloud:export-users plus
cloud:cleanup-unverified-users with tests.
2026-07-16 11:57:52 +02:00
Andras Bacsai 772093928f Merge remote-tracking branch 'origin/next' into v5-parallel-inertia-react 2026-07-11 10:06:49 +02:00
Andras Bacsai d3fbb32c52 feat(cdn): sync release metadata through BunnyCDN
Replace the legacy sync:bunny flags with an interactive CDN sync flow for service templates and release metadata. Serve official service templates from the Coollabs CDN, update version metadata, and remove obsolete helper scripts.
2026-07-10 14:29:11 +02:00
Andras Bacsai fbc6fd5ce5 fix(v5): rotate agent tokens every fifteen minutes 2026-07-06 22:35:17 +02:00
Andras Bacsai 6ae45684f9 feat(v5): add server reconciliation and canvas APIs
Split V5 dashboard behavior into domain controllers and policies,
add agent token rotation/revocation, status reconciliation jobs,
ingress firewall syncing, and canvas connection APIs.

Add migrations for V5 status tracking, server capabilities, resource
connection aliases, and revoked agent tokens.
2026-07-06 17:40:37 +02:00
Andras Bacsai e3e91b7741 feat(v5): sync server status and ingress access
Add Flux agent token issuing, open and revoke Caddy ingress firewall
rules, broadcast server-scoped application status updates, and update
the dashboard to show unreachable servers as unknown.
2026-06-22 11:56:26 +02:00
Andras Bacsai 75cbcad240 feat(v5): show server stale status and coold logs 2026-06-22 11:14:13 +02:00
Andras Bacsai ec3e5dc9eb feat(dev): include firewall capabilities in flux defaults 2026-06-21 21:47:35 +02:00
Andras Bacsai 4061a3844b feat(v5): sync resource firewall rules via Flux 2026-06-21 21:16:08 +02:00
Andras Bacsai 4938b65f20 refactor(v5): defer builder bootstrap support
Remove active builder flags from dev Lima sync, bootstrap commands,
and server capabilities while documenting the v5 control-plane and
host-agent boundaries.
2026-06-21 16:54:02 +02:00
Andras Bacsai 86156b6f7a feat(v5): add mesh app canvas 2026-06-20 09:23:16 +02:00
Andras Bacsai 3ae87334bd feat(v5): add WireGuard and coold/corrosion config to clusters/servers
Add WireGuard networking fields (interface, management pool, listen port),
container network pool, coold/corrosion versioning, and builder CPU quota
to clusters and servers via new migrations and model fillables.

Expose full cluster and server CRUD on the Clusters page with private key
selection, pending state tracking, and new form primitives (Field, Input,
Textarea). Add server status check fields and a lima test VM config for
development.
2026-06-19 07:23:45 +02:00
Andras Bacsai 1e038fecae feat(v5): add server clusters and CLI bootstrap
Create v5 cluster/server persistence, expose them on the home page,
and add a bootstrap endpoint backed by the coolify CLI. Add dev Lima
server sync support and update the dev script firewall flow.
2026-06-16 15:45:16 +02:00
Andras Bacsai 1b1b0726a2 feat(dev): add coold VM dev workflow
Add scripts and Lima config for managing local coold endpoint VMs,
mint Flux dev host JWTs, expose coold host details on the V5 home
page, and document the local development workflow.
2026-06-16 11:39:36 +02:00
Andras Bacsai 78d8afa602 Merge remote-tracking branch 'origin/next' into audit-policies 2026-06-15 12:05:19 +02:00
Andras Bacsai 61d2d17f52 feat(subscription): add Stripe action controls
Add subscription action handling and tests for cancel, resume, and refund flows while resolving StripeClient through the container.
2026-06-12 15:54:21 +02:00
Andras Bacsai 22f9f96db6 chore: inspect staged changes for commit message 2026-06-04 15:24:53 +02:00
Andras Bacsai 062ad57740 fix(security): enforce team access on mutable actions
Authorize cloud provider token access, audit sensitive operations, and
standardize public IDs across deployment and resource flows.
2026-06-04 11:03:06 +02:00
Andras Bacsai 08735e6cc8 feat(postgres): add internal database upgrade script
Publish upgrade-postgres.sh with install and upgrade flows, include the
PostgreSQL compose override when present, and sync the script to BunnyCDN.
2026-06-03 14:27:01 +02:00
Andras Bacsai 07f381b88c Merge remote-tracking branch 'origin/next' into jean/port-exposes-improvement 2026-06-03 10:32:57 +02:00
Andras Bacsai 40294bc3b3 chore: inspect staged changes 2026-06-02 14:05:26 +02:00
Andras Bacsai 1b68f11ec0 fix(cleanup): disable unreachable self-hosted servers
Preserve self-hosted server IPs during unreachable cleanup and force-disable them instead. Keep cloud cleanup behavior overwriting the IP, with test coverage for both paths.
2026-05-31 21:47:18 +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 ed3780b2a7 fix(schedule): run stale multiplex cleanup on crons queue
Dispatch CleanupStaleMultiplexedConnections through the crons queue and
cover the scheduled job queue assignment with a feature test.
2026-05-26 13:51:22 +02:00
Andras Bacsai 8a40c4e348 chore(sync-bunny): remove GitHub release sync paths
Drop the unused GitHub release and version sync options from sync:bunny,
leaving the command focused on BunnyCDN template, release, and nightly syncs.
Update the nightly test to assert it does not invoke gh or git.
2026-05-26 11:51:38 +02:00
Andras Bacsai 21db1fd374 fix(sync-bunny): sync nightly CDN files to nested paths
Write nightly versions and releases under json/nightly in the CDN repo, and cover both release and versions-only sync flows with feature tests.
2026-05-26 11:41:04 +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 b124397613 fix(schedule): prevent duplicate SSL certificate regeneration
Run RegenerateSslCertJob on one server only and add coverage to ensure scheduled production jobs use onOneServer.
2026-05-21 19:19:43 +02:00
Andras BacsaiandClaude Opus 4.7 90ddbb3572 feat(security): support expiration on API tokens with warning notifications
Add optional expiration to personal API tokens. Users pick a duration
(1/7/30/60/90 days or Never) at creation time. Expired tokens are
rejected by Sanctum, pruned hourly by sanctum:prune-expired, and a
team notification fires ~24h before expiry so owners can rotate
before API calls start failing.

- ApiTokens Livewire component stores expires_at from expiresInDays
- Rework issued-tokens UI from card grid to table (matches other views)
- New ApiTokenExpirationWarningJob scheduled hourly (idempotent via RateLimiter)
- New ApiTokenExpiringNotification (email/discord/telegram/slack/pushover)
- api_token_expiring added to alwaysSendEvents so users cannot silence
  expiry warnings from the per-event notification toggle UI
- sanctum:prune-expired cadence moved from daily to hourly

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 14:28:38 +02:00
Andras BacsaiandClaude Opus 4.7 bb0c3501ef refactor(cli): validate --date and escape shell args on logs:scheduled
Reject malformed --date values with a clear error before building any
shell command, and wrap every interpolated value (log paths, filter
expression, line count) in escapeshellarg() so filter options and date
values can no longer break out of the tail/grep pipeline.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 12:09:48 +02:00
Andras Bacsai aa445b4a6c Resolve remaining merge conflicts 2026-04-14 11:14:22 +02:00
Andras Bacsai 1a603a10ed fix(models): replace forceFill/forceCreate with fill/create and add fillable guards
Replace all uses of `forceFill`, `forceCreate`, and `forceFill` with their
non-force equivalents across models, actions, controllers, and Livewire
components. Add explicit `$fillable` arrays to all affected Eloquent models
to enforce mass assignment protection.

Add ModelFillableCreationTest and ModelFillableRegressionTest to verify that
model creation respects fillable constraints and prevent regressions.
2026-03-31 13:45:31 +02:00
Andras Bacsai 1da1f32f0e refactor: use forceCreate() for internal model creation
Replace create() with forceCreate() across internal model creation operations to bypass mass assignment protection. This is appropriate for internal code that constructs complete model state without user input.

Add InternalModelCreationMassAssignmentTest to ensure internal model creation behavior is properly tested. Optimize imports by using shortened Livewire attribute references and removing unused imports.
2026-03-30 13:04:11 +02:00
Andras BacsaiandGitHub 9e96a20a49 fix: add validation and escaping for Docker network names (#9228) 2026-03-29 20:46:39 +02:00
Andras BacsaiandClaude Opus 4.6 3d1b9f53a0 fix: add validation and escaping for Docker network names
Add strict validation for Docker network names using a regex pattern
that matches Docker's naming rules (alphanumeric start, followed by
alphanumeric, dots, hyphens, underscores).

Changes:
- Add DOCKER_NETWORK_PATTERN to ValidationPatterns with helper methods
- Validate network field in Destination creation and update Livewire components
- Add setNetworkAttribute mutator on StandaloneDocker and SwarmDocker models
- Apply escapeshellarg() to all network field usages in shell commands across
  ApplicationDeploymentJob, DatabaseBackupJob, StartService, Init command,
  proxy helpers, and Destination/Show
- Add comprehensive tests for pattern validation and model mutator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-28 12:28:59 +01:00
Andras Bacsai bd9a8cee07 style(dev): standardize log message format with INFO/ERROR prefixes
- Add INFO prefix to informational messages
- Add ERROR prefix to error messages
- Fix grammar and punctuation for consistency
2026-03-28 12:07:34 +01:00
Andras Bacsai 9b0088072c refactor(docker): migrate service startup from Artisan commands to shell scripts
Remove custom Artisan console commands (Horizon, Nightwatch, Scheduler) and
refactor service startup logic directly into s6-overlay shell scripts. Check
environment variables from .env instead of routing through Laravel config.

Services now sleep when disabled instead of exiting immediately. Both
development and production environments updated consistently.
2026-03-27 14:12:30 +01:00
Andras Bacsai e6de2618f9 feat(sync): sync install.sh, docker-compose, and env files to GitHub
Adds syncFilesToGitHubRepo method to handle syncing install.sh,
docker-compose, and env files to the coolify-cdn repository via a
feature branch and PR. Supports both nightly and production environments.
2026-03-25 07:07:22 +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 f68793ed69 feat(jobs): optimize async job dispatches and enhance Stripe subscription sync
Reduce unnecessary job queue pressure and improve subscription sync reliability:

- Cache ServerStorageCheckJob dispatch to only trigger on disk percentage changes
- Rate-limit ConnectProxyToNetworksJob to maximum once per 10 minutes
- Add progress callback support to SyncStripeSubscriptionsJob for UI feedback
- Implement bulk fetching of valid Stripe subscription IDs for efficiency
- Detect and report resubscribed users (same email, different customer ID)
- Fix CleanupUnreachableServers query operator (>= 3 instead of = 3)
- Improve empty subId validation in PushServerUpdateJob
- Optimize relationship access by using properties instead of query methods
- Add comprehensive test coverage for all optimizations
2026-02-28 13:18:44 +01:00
Andras Bacsai b88f9fca67 chore: prepare for PR 2026-02-25 12:07:29 +01:00
Cinzya dfd0edff64 feat(services): add architecture warning 2026-02-16 19:19:59 +01:00
Andras BacsaiandGitHub 766355b9ac test: migrate to SQLite :memory: and add Pest browser testing (#8364) 2026-02-16 14:41:54 +01:00
peaklabs-dev 25ccde83fa fix(api): add a newline to openapi.json 2026-02-16 00:04:05 +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