Commit Graph
56 Commits
Author SHA1 Message Date
Andras Bacsai c6b8dfe367 fix(status): store the status of a database or service right after it starts
After a start, the UI showed "exited" until the regular status check ran.
That check runs on the shared high queue, which can be busy (60 s on Cloud).

The start job (database) and the start task (service, on the deployment
queue) now inspect only the started containers and store their status
before they broadcast. While a health check reports "starting", they
inspect again for up to about 15 s.

ContainerStatusAggregator now builds the per-container status and the
Compose aggregation for both writers, so GetContainersStatus and the
targeted check store the same strings.
2026-10-03 21:16:44 +02:00
Andras Bacsai f1f7272494 fix(queue): run service and database start commands on the deployment queue
On cloud, StartService and DeployServiceApplication dispatched their
CoolifyTask on the high queue, so service starts competed with all other
high jobs. remote_process() and CoolifyTask now accept a queue (default
high); start paths pass deployment_queue(). The queued RestartDatabase
action also runs on deployment_queue() instead of the default queue.
2026-10-03 20:50:49 +02:00
Andras BacsaiandClaude Opus 5.5 9bdbbeef7a fix(secret-manager): use remote secret values exactly and check them before a restart
- Write remote secret values as exact dotenv literals in the service .env
  file and escape "$" where they go directly into a generated compose file
  (environment, start commands, healthchecks).
- Resolve remote secrets before a service or database restart stops the
  running resource, and show the secret manager error instead of a generic
  start failure (new RemoteSecretException).
- Cache fetched key names for the autocomplete and rate limit how often a
  user can contact the secret manager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:00:41 +02:00
Andras BacsaiandClaude Opus 5.5 49ae227f6e fix(compose): keep the old volume of existing resources for external volumes
Switching an external volume from the old <uuid>_<name> volume to the
declared external volume on redeploy could make an app look as if it
lost its data (for example a database that initializes a new, empty
data directory).

- If a resource already has the storage entry with the old generated
  name, the parsers keep using that volume and show a warning in the
  deployment log and the service start log, with the steps to switch.
- Without that entry (new resources, or external volumes added later)
  the external volume is used as declared.
- Deleting the old storage entry (storage page) switches to the
  external volume on the next deployment; the storage entry shows a
  note about it.
- Legacy Compose applications (parser versions 1 and 2) never stored
  their volumes, so they keep the old volume names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 17:24:51 +02:00
Andras BacsaiandClaude Opus 5.5 fe6854c73e fix(storage): write content files before compose up and never drop their content
- Compose content files are written by a queued job. Deployments and
  service starts now check all content files with one command before
  docker compose up: a missing file or an empty directory (left by
  Docker) is written; an existing file is kept; a directory with files
  is kept with a visible warning.
- The server file sync that runs after every parse marked a file
  storage as a directory and deleted its configured content when a
  directory was at its path. A storage with content now keeps its
  content; an empty directory is replaced with the file.
- Saving a storage no longer fails for an existing file, replaces an
  empty directory, and no longer deletes a directory with files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 16:26:56 +02:00
Andras Bacsai 87685d1e09 chore: align control-plane behavior 2026-09-24 15:46:04 +02:00
Andras Bacsai 053b030c42 fix: remove database restart limits and clear stale Traefik state
Drop restart-limit fields and enforcement from database resources, clear cached Traefik version data when proxies change, and show missing service environment variables from disabled deploy actions.
2026-09-04 15:42:26 +02:00
Andras Bacsai 67b33c27a9 fix(applications): persist restart limit state for stopped containers (#11566) 2026-08-31 13:13:26 +02:00
Andras Bacsai d87ab279fb fix(log-drain): connect drain to service networks
Ensure the log drain container joins enabled service destination networks
when services start or the log drain restarts.
2026-06-02 14:33:57 +02:00
Andras Bacsai c9fcc0bc44 fix(service): defer stop when pulling latest images
Ensure restart actions flow through StartService so pull-latest restarts can
avoid stopping the service before image pulls. Also raise the changelog modal
above the desktop sidebar toggle.
2026-05-31 21:19:18 +02:00
Andras Bacsai e2199f1223 fix(queue): route cloud jobs to dedicated queues
Use config-based queue selection for deployment and scheduled jobs so cloud dispatches deployments to `deployments` and scheduled jobs to `crons`, while self-hosted keeps using `high`.

Add coverage for deployment queue helper, start action routing, and scheduled job manager routing.
2026-05-22 16:11:24 +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 f5fa09790e refactor: improve command handling and ensure correct working directory for Docker operations 2025-11-10 14:40:03 +01:00
Andras Bacsai 712d60c75b feat: ensure .env file exists for docker compose and auto-inject in payloads 2025-11-07 15:20:10 +01:00
Andras Bacsai 13a9816770 fix(service): ensure configuration changes are properly tracked and dispatched 2025-07-03 15:08:13 +02:00
Andras Bacsai 8fc79022f3 feat(service): enhance service status handling and UI updates 2025-06-24 12:52:22 +02:00
Andras Bacsai 786bfa960f improvement(core): simplify events for app/db/service status changes 2025-05-19 21:50:32 +02:00
Andras Bacsai d632eb2be9 refactor: simplify service start and restart workflows 2025-02-04 14:34:34 +01:00
Andras Bacsai 7dc65dfd79 fix: make sure important jobs/actions are running on high prio queue 2024-11-22 11:16:01 +01:00
Lucas Michot 1ec224fde1 Inline many variables. 2024-10-31 18:20:11 +01:00
Lucas Michot d557a22b91 Remove all ray() calls 2024-10-28 13:51:23 +01:00
Andras Bacsai 682b45a2b5 refactor: Improve Docker network connection command in StartService.php 2024-09-16 16:39:16 +02:00
Vahor 66cf6df4b3 skip docker network creation 2024-09-09 23:46:29 +02:00
Andras Bacsai 1fb8d1e14c revert: pull policy 2024-07-17 07:59:06 +02:00
Andras Bacsai b1c0f105ab fix: update docker compose pull command with --policy always 2024-07-15 12:13:21 +02:00
Thijmen d86274cc37 Fix styling 2024-06-10 20:43:34 +00:00
Andras Bacsai a43c916009 Refactor code and add new fields for Kong service 2024-02-28 13:48:39 +01:00
Andras Bacsai 45e404b15b feat: disable gzip compression on service applications 2024-02-15 20:44:01 +01:00
Andras Bacsai 9edbc15828 Update database start commands 2024-02-07 20:34:13 +01:00
Andras Bacsai fd2a533057 Refactor database and service start commands 2024-02-05 20:57:40 +01:00
Andras Bacsai 2b394d6fea fix: show container on logs/executecontainer command views
fix: exclude containers with restart: no from hc
feat: add compose to predefined docker network
service: add glitchtip
2024-01-21 14:30:03 +01:00
Andras Bacsai 75d1ec4f42 feat: pull latest images for services 2023-12-14 14:50:38 +01:00
Andras Bacsai 6882ce8d0f fix: service start + event 2023-12-08 15:12:08 +01:00
Andras Bacsai eccd41217f fix network name 2023-12-08 15:07:50 +01:00
Andras Bacsai a249ee1b1f fix: live event 2023-12-08 13:55:55 +01:00
Andras Bacsai 828fec9448 fix: do not create duplicated networks 2023-12-08 13:24:28 +01:00
Andras Bacsai b55bd298f2 fix: service navbar using new realtime events 2023-12-08 12:12:44 +01:00
Andras Bacsai 028a2eb275 Fix Docker compose build command and remove debug statements 2023-12-01 22:16:27 +01:00
Andras Bacsai 2001be07d0 refactor: env variable generator 2023-11-28 12:05:04 +01:00
Andras Bacsai 4a21102983 fix: server adding process 2023-11-21 12:07:06 +01:00
Andras Bacsai b01f6ac414 Fix docker network connection in StartService.php 2023-11-07 13:29:05 +01:00
Andras Bacsai e1bc2cc406 Fix docker network connection issue in
StartService.php
2023-11-07 13:28:48 +01:00
Andras Bacsai 74830b12f3 Fix Docker network creation command in
StartService.php
2023-11-07 13:28:10 +01:00
Andras Bacsai 540717e809 feat: attach Coolify defined networks to services 2023-10-02 16:57:55 +02:00
Andras Bacsai 7d1a76570c wip 2023-10-02 15:51:06 +02:00
Andras Bacsai 0f542c65ae fix: manually create network for services 2023-09-27 22:35:10 +02:00
Andras Bacsai f0abdcc2da okay, now it is way better 2023-09-27 12:45:53 +02:00
Andras Bacsai fabb97330a puh, fixes 2023-09-26 14:45:52 +02:00
Andras Bacsai 0b11093d18 feat: services 2023-09-25 15:48:43 +02:00
Andras Bacsai 58522b59b7 - package updates
- feat: service fixes
- ui: help menu
2023-09-25 12:49:55 +02:00