6 Commits
Author SHA1 Message Date
Andras Bacsai 1a2a5362ad fix(security): secure remote command secrets and clone volume data 2026-10-27 09:47:18 +01:00
Andras Bacsai dcbad815fe fix(previews): keep compose preview data out of production pending changes
Closes #12284
2026-10-23 19:46:44 +02:00
Andras Bacsai 8aa57d66e8 fix(previews): give each preview its own volume for external volumes
Previews of Docker Compose applications used external volumes as
written, so a preview mounted the production volume. Two database
containers on the same data can corrupt it.

- A preview uses {uuid}_<name>-pr-N with a name-only declaration, the
  same name as v4.3.23, so old preview volumes are used again
- Production still uses the external volume as written
- Preview cleanup removes the preview volume, never the external one
- Do not show the external volume warning for previews
2026-10-05 21:25:40 +02:00
Andras BacsaiandClaude Opus 5.5 ee62f64add fix(compose): use external volumes as declared
Compose volumes declared with external: true (or external: {name: x})
were renamed to <uuid>_<name>, so containers got a new empty volume
instead of the existing one. All Compose parsers (applications,
previews, services, and the legacy parsers) now use them as written:
no uuid prefix, no preview suffix, the top-level declaration kept, and
no tracking row, so Coolify never removes a shared external volume.
External volume names must be literal; ${VAR} names are rejected.
Existing <uuid>_<name> volumes and their rows are kept on redeploy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 16:53:54 +02:00
Andras BacsaiandClaude Opus 5.5 700d476bac fix(dev): rewrite host paths only for the testing-host dev server
Development mode rewrote /data/coolify paths to the dev Docker volume
for every server. That is only right for the testing-host backend,
which uses the host Docker daemon. The KVM localhost and other dev VMs
have their own /data/coolify, so bind mounts, Compose content files,
the Traefik and Caddy traffic mounts, Sentinel, and database proxies
pointed to wrong paths there.

- Server::sharesDevHostDocker() and devHostDockerPath() decide per
  server; only the testing-host server (ip coolify-testing-host) gets
  the volume path. Production is unchanged.
- The testing-host volume names come from the Compose project
  (DEV_COOLIFY_DATA_VOLUME, DEV_COOLIFY_BACKUPS_VOLUME), with the
  legacy names as fallback.
- In development, saved proxy configurations with the old path are
  fixed when they load and ask for a proxy restart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 15:21:39 +02:00
Andras BacsaiandClaude Opus 5.5 129cc97047 fix(previews): remove only the preview's own networks and volumes
- Deleting a Docker Compose preview removed every top-level network
  and volume named in the compose file, so it could disconnect
  coolify-proxy from the coolify network or a shared proxy network and
  delete a shared named volume. It now removes only the network and
  volumes that Coolify generated for that preview, and a network only
  when no other container uses it.
- A deployment that stops with an explained error (unsafe compose,
  missing secret keys, invalid build variable names) shows the
  explanation once, followed by "Deployment failed.".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 14:37:21 +02:00