Commit Graph
704 Commits
Author SHA1 Message Date
Andras Bacsai 165d2f3dc8 fix: harden traffic analytics, terminal errors and Postgres restores
Traffic analytics:
- Reject enabling unless the server runs a Coolify-managed Traefik or
  Caddy proxy, and show the reason in the settings UI
- Save the proxy configuration before the setting so a failure leaves
  both unchanged; allow disabling after the proxy was removed
- Skip the proxy restart when the proxy is stopped and report that the
  config applies on next start
- Preserve the user's own Traefik --accesslog* flags and restore them
  when analytics is disabled
- Rotate the Traefik access log in the sidecar with BusyBox tools
  (copytruncate, 5 gzip rotations)
- Create the access log before starting Sentinel, which opens it once

Terminal:
- Detect and surface WebSocket connection rejections in the browser
  terminal, with shared helpers in terminal-connection.js and
  terminal-utils.js

Database import:
- Restore PostgreSQL backups in a single transaction; SQL replace
  restores go into a temporary database and swap in only on success,
  leaving the current database untouched on failure
2026-09-25 22:58:07 +02:00
Andras Bacsai 37bd776f70 feat(services): allow variables in compose network names
Accept a top-level network `name:` that is a single Compose variable
(`${VAR}`, `${VAR:-default}`, `${VAR-default}`), e.g. for external
networks that differ per server. The default must still be a valid
network name; surrounding text, nested variables, and shell syntax
are still rejected.

When parsing services, such variables are created as service
environment variables (seeded with the default) so users can view and
change them, while the compose file keeps the variable for Compose to
resolve from .env at deployment. Existing values are preserved on
re-parse.
2026-09-25 21:43:35 +02:00
Andras Bacsai 554b79e8dd feat: add Traefik ACME cert UI and shared managed DNS record ownership
- Proxy: list and delete Traefik ACME certificates from the server proxy
  page via new TraefikAcmeService and Get/DeleteTraefikCertificate actions
- DNS: track ownership and cross-resource references for managed DNS
  records so records are only deleted when no longer referenced; release
  records asynchronously on resource deletion via ReleaseManagedDnsRecordsJob
  and ManagedDnsRecordCleanup; harden Cloudflare provider deletion results
- Databases: fail closed on start when prerequisites or the CA certificate
  are missing (DatabaseStartException, Server::ensureCaCertificate) and
  clean up stale start activities via ResourceStartActivity
- Webhooks: throttle repeated manual webhook signature failures for
  GitHub, GitLab, Gitea and Bitbucket
- Deployments: improve compose build-context handling and compose file
  load error reporting
- Install scripts: rework terminal UI output in install.sh (stable and
  nightly)
- Misc: settings sidebar accordion fixes, log drain toggle rollback,
  add Serverside to README sponsors
- Add migrations and tests covering the above
2026-09-25 19:00:00 +02:00
Andras Bacsai 84b596f7ca fix(proxy): only emit Caddy log_append on caddy-docker-proxy 2.9+
Caddy 2.7.6, shipped in the caddy-docker-proxy 2.8 image, rejects the
whole Caddyfile when it contains log_append. Add
Server::caddySupportsLogAppend(), which reads the image from the applied
proxy configuration. Traffic analytics labels now add log_append only
when the server runs 2.9 or newer and has no pending proxy change.

- Change the default Caddy proxy image from 2.8-alpine to 2.13-alpine
- ProxyPortParser now validates Docker Compose port ranges and random
  host ports. It returns only fixed host ports for the availability
  check and has a clearer validation message
- After mkdir, chown only root-owned files and remove other-user access
  from the top directory only. Files owned by container users and the
  modes of mounted files no longer change
- Add tests for log_append support and the new parser/sudo behaviour
- Note in the lessons file that tests must flush the Server identity map
  between dataset cases
2026-09-25 13:59:30 +02:00
Andras Bacsai 82bb574760 fix(servers): stop double sudo on chown/chmod after mkdir
The mkdir ownership rule prepended `sudo` to chown/chmod, and the &&
rule then added another, producing `sudo sudo`. That fails on hosts
like Alpine, where root is not in sudoers. Both parseCommandsByLineForSudo
and parseLineForSudo now leave the prefix to the && rule.

Also:
- Fix the `App\Helpers\SSLHelper` reference in RegenerateSslCertJob to
  `SslHelper`, so it autoloads on case-sensitive filesystems.
- Stop StartPostgresql and StartMongodb from overriding the configuration
  dir with a hardcoded Docker volume path in development.
- Add tests for nested sudo behaviour, the class reference letter case
  and database configuration dirs in development.
2026-09-25 13:15:57 +02:00
Andras Bacsai 3879d82b08 fix(storage): confine remote paths on BusyBox and non-root servers
Replace the `realpath -m` confinement check with a POSIX sh script that
uses `readlink -f`, which BusyBox (Alpine) also provides. The script
walks up to the deepest existing path, resolves it, and appends the
missing rest. It fails closed on dangling symlinks and on `.`/`..` in
the missing part.

Send the script as a single `sh -c '<script>' sh <base> <path>` line so
the non-root sudo parser only adds sudo in front of it and does not
rewrite `$(...)`, `&&` or case statements.

Add unit tests that run the command with GNU and BusyBox tools, as root
and through the sudo parser, against a real symlink tree. Update the
feature test fakes to match the new command.
2026-09-25 12:50:08 +02:00
Andras BacsaiandClaude Opus 5.5 9e999a2782 fix(database): restore every supported backup format safely
- Detect the backup format before any database is changed. "All databases"
  imports no longer drop everything when the file cannot be restored.
- PostgreSQL: restore custom and tar archives with pg_restore and SQL with
  psql in both modes, including gzip; restore the #11481 custom-archive fix.
  Replacing existing data recreates the database for SQL backups.
- MySQL/MariaDB: accept a tar with one dump; reject dumps with more than one
  database in single mode instead of restoring them partially.
- MongoDB: restore plain and gzip archives and dump directories packed as
  tar; "Replace collections" maps to --drop.
- Prepare bz2, xz, and zip backups in the helper image, because database
  images do not ship those tools; stream S3 backups from the S3 helper.
- Show the exact restore script in the import form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 11:32:04 +02:00
Andras Bacsai 0935bf141e Improve volume path handling (#11993) 2026-09-24 23:22:35 +02:00
Andras Bacsai 5721266010 fix(server-transfer): allow local peer targets in development
Route localhost targets through host.docker.internal in containers while continuing to reject other private targets.
2026-09-24 21:28:52 +02:00
Andras Bacsai 87685d1e09 chore: align control-plane behavior 2026-09-24 15:46:04 +02:00
Andras Bacsai c7838c7800 ci(testing-host): publish image only to Docker Hub 2026-09-24 13:48:32 +02:00
Andras Bacsai 3f47bae0b6 fix(service): save switches without saving pending Compose edits (#11985) 2026-09-24 13:43:37 +02:00
Andras Bacsai 4b8c50a546 Improve file storage metadata handling 2026-09-24 12:28:12 +02:00
Andras Bacsai 26248ca161 fix(backups): improve backup command handling 2026-09-24 11:44:53 +02:00
Andras Bacsai 0e40632fff Improve database startup progress output (#11970) 2026-09-24 08:25:43 +02:00
Andras Bacsai 25f74da0c9 Improve database startup progress output 2026-09-24 08:24:33 +02:00
Andras Bacsai c158957e18 Improve URL address validation 2026-09-24 07:11:06 +02:00
Andras Bacsai cfe8a800cf Improve raw Compose volume path handling 2026-09-22 21:34:38 +02:00
Andras Bacsai 99dd634ba3 Improve file storage handling 2026-09-22 21:13:39 +02:00
Andras Bacsai 67dd34bce7 Merge remote-tracking branch 'origin/next' into reverb-realtime-migration 2026-09-21 21:32:19 +02:00
Andras Bacsai a7bf6d1cfe fix(proxy): normalize port configuration handling 2026-09-21 17:03:07 +02:00
Andras Bacsai bfb732bbe8 fix(webhooks): validate preview repository metadata 2026-09-21 16:53:50 +02:00
Andras Bacsai 17ca63ff4c fix(deployments): validate environment variable names used in Docker commands
Reject names that are not portable identifiers before a deployment starts
and when Docker flags are built. Quote the full KEY=value assignment for
docker run -e flags, and declare generated Dockerfile ARGs as keys only.
2026-09-21 15:42:12 +02:00
Andras Bacsai aa2b6b862b fix(compose): validate Docker network names
Require Compose network names to match Docker identifier rules.
Ensure missing proxy networks with inspect and a single escaped argument.
2026-09-21 15:30:11 +02:00
Andras Bacsai 41e00bc1cb fix(deployments): validate compose build paths 2026-09-21 14:57:15 +02:00
Andras Bacsai 3e82166da0 ci(realtime): enable manual runs and config-triggered builds
Add workflow dispatch support and rebuild triggers for config/constants.php, with test coverage for both workflow changes.
2026-09-21 12:40:54 +02:00
Andras Bacsai a29f02fbb1 Merge remote-tracking branch 'origin/main' into pr-11443-next
# Conflicts:
#	openapi.json
#	openapi.yaml
#	resources/views/livewire/project/application/heading.blade.php
#	resources/views/livewire/project/service/heading.blade.php
2026-09-19 17:44:44 +02:00
Andras Bacsai e2e2d4010b fix(deployments): trim remote command outputs before processing
Normalize saved command output for reliable status and metadata handling, and bump the Coolify version to 4.3.23.
2026-09-18 15:34:50 +02:00
Andras Bacsai ebfd4d0c1c Merge remote-tracking branch 'origin/main' into pr-11443-next
# Conflicts:
#	app/Actions/Server/StartSentinel.php
#	app/Livewire/Server/Sentinel.php
#	resources/views/livewire/project/shared/storages/all.blade.php
#	resources/views/livewire/project/shared/storages/show.blade.php
2026-09-18 12:00:04 +02:00
Andras Bacsai 054c560cbd fix(deployments): preserve whitespace in saved command output (#11466) 2026-09-16 17:34:51 +02:00
Andras Bacsai 16b092336e feat(sentinel): track synchronization state and refresh status UI
Add sentinel waiting-state tracking, synchronization broadcasts, and restore
status handling across server and application interfaces.
2026-09-16 12:51:27 +02:00
Andras Bacsai e1bcf1fb86 ci: notify Discord after image builds 2026-09-16 11:26:35 +02:00
github-actions[bot] 69d1e89ac2 Merge remote-tracking branch 'origin/main' into next 2026-09-16 03:14:20 +00:00
Andras Bacsai ede9d8417a build(minio): use packaged mx client in development images 2026-09-15 23:00:45 +02:00
Andras Bacsai ab30f95ad9 feat(restarts): make resource restart limits opt-in
Default restart limits to zero for applications, previews, and services, and bump the Coolify version to 4.3.21.
2026-09-15 12:58:59 +02:00
Andras Bacsai 8ab54da2ac style(ui): remove description placeholders and normalize control heights 2026-09-15 12:28:16 +02:00
Andras Bacsai 776c56f947 fix(helper): hide deployment details unless explicitly requested 2026-09-15 11:38:33 +02:00
github-actions[bot] 02ab8db270 Merge remote-tracking branch 'origin/main' into next 2026-09-15 03:14:58 +00:00
Andras Bacsai 22fbbd74ff fix(sentinel): restore hourly version checks for enabled servers
Dispatch Sentinel checks hourly for eligible servers, including healthy
installations, while continuing to exclude build servers.
2026-09-14 15:43:52 +02:00
github-actions[bot] b903def71b Merge remote-tracking branch 'origin/main' into next 2026-09-14 11:33:22 +00:00
Andras Bacsai b692b27b4e chore(docker): pin AIStor MinIO client release 2026-09-14 13:32:30 +02:00
Andras Bacsai 2c1744fbd2 Merge remote-tracking branch 'origin/next' into pr-11784-automation/sync-main-to-next 2026-09-14 13:30:17 +02:00
Andras Bacsai 6a8cee4630 Merge remote-tracking branch 'origin/next' into automation/sync-main-to-next 2026-09-14 13:26:19 +02:00
Andras Bacsai 7d11bc92f7 feat(logs): accept all for log lines and keep -1
API log endpoints and the GetLogs UI now treat `all` as unbounded
output, with `-1` remaining as a compatibility alias. MCP still
falls back to a positive default. Traefik version checks run from
CheckForUpdatesJob instead of a weekly schedule.
2026-09-13 15:25:20 +02:00
Andras Bacsai fc9e61b7b4 feat(services): open resource settings in a modal with restart limits
Move service application and database settings into an embedded modal with a footer, subtitle helper, and Docker restart-count control. Accept max_restart_count on the service applications API, cap compose YAML collection aliases, and tighten status, backup, and database sidebar layouts.
2026-09-10 17:39:56 +02:00
Andras Bacsai d24ee35824 fix(s3): allow uppercase letters in S3 bucket names
S3-compatible and legacy buckets may include uppercase letters. Relax the bucket name pattern, validation messages, and tests so those names are accepted while still rejecting invalid characters and formats.
2026-09-10 15:12:53 +02:00
Andras Bacsai a0a8c86752 fix(domains): ignore hostless URLs in deployment and port overrides 2026-09-10 12:33:50 +02:00
Andras Bacsai 0134401f7c fix(service): write compose .env files atomically via temp rename
Replace direct .env overwrite with a unique temp file and mv so a
partial write cannot leave a truncated environment file on disk.
2026-09-10 09:24:37 +02:00
Andras Bacsai 361d5a3c8c feat(deploy): pull compose images before stopping containers
Pull image-based Docker Compose services with --ignore-buildable before stopping the current deployment so image-only services are ready first. Fail the deploy if pull fails, and run the pull on the runtime server when a build server is used.
2026-09-10 09:03:28 +02:00
peaklabs-dev 9faa4f4b7c Merge branch 'main' into next 2026-09-09 15:32:27 +02:00