443 Commits

Author SHA1 Message Date
Hamza Younas bf1beb5c99 Append leader hostname to backup filename (#1257)
Backup tar files currently use a filename that only encodes a
timestamp and the leader's IP, e.g.

    caprover-backup-2026_04_10-19_30_00-1744312200000-ip-1_2_3_4.tar

When you run several CapRover instances behind a NAT or with
similar IPs, that filename is not enough to tell the backups apart
after downloading them.

This appends the swarm leader's hostname to the existing filename:

    caprover-backup-...-ip-1_2_3_4-host-captain-prod.tar

The hostname is sanitized to a portable charset ([A-Za-z0-9._-]) so
it is safe in filesystems and HTTP Content-Disposition headers, and
the segment is omitted entirely when the leader has no hostname, so
existing single-node setups see no change beyond an additional
suffix when one is available.

The sanitization step is exposed as a small static helper
(`BackupManager.sanitizeHostnameForFilename`) so it can be unit
tested in isolation. Top-level cleanup hooks in the existing test
file are now gated on `process.env.CI`, matching how the
integration tests in the same file are gated, so the new pure
helper tests can run on a developer workstation.

Closes #1257
2026-04-10 19:56:29 +05:00
Ivn Nv 78d57c93ea more maintainable implementation 2026-01-30 21:49:18 -05:00
Ivn Nv 60a1fd880b fix null case / format 2026-01-30 21:33:47 -05:00
Ivn Nv 38a45dfbe7 Add PATCH /update/ endpoint for partial app definition updates
The existing POST /update/ replaces all fields — omitted fields are
reset to defaults (e.g. envVars becomes [], instanceCount becomes 0).
This makes simple operations like scaling dangerous: sending only
{appName, instanceCount} wipes all environment variables.

The new PATCH /update/ endpoint fetches the existing app definition
and merges only the explicitly provided fields. Omitted fields retain
their current values.

Example — scale without touching env vars:
  PATCH /api/v2/user/apps/appDefinitions/update/
  {"appName": "my-app", "instanceCount": 1}

The POST endpoint is unchanged — full backward compatibility.
2026-01-30 13:33:45 -05:00
Kasra Bigdeli edee7d8613 Fixed issue raised in https://github.com/caprover/caprover/pull/2362\#issuecomment-3609213641
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-12-03 22:59:41 -08:00
Radosław Kłos 93c7981b9a Add support for new ANONYMIZE_IP env in goAccess 2025-12-02 00:59:44 +01:00
Kasra Bigdeli cfe02af46a Updated https://github.com/caprover/caprover/pull/2360 2025-11-30 21:26:53 -08:00
Dillon Shook 53411da0b9 PR feedback 2025-11-30 13:17:35 -05:00
Dillon Shook 1c501b8dd4 #2259 Enable gzip compression for apps 2025-11-28 21:07:59 -05:00
Kasra Bigdeli 0b3fdd31de Implemented BuildKit https://github.com/caprover/caprover/issues/1582
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-11-27 22:24:59 -08:00
Kasra Bigdeli 1f54088302 Fixed https://github.com/caprover/caprover/issues/2354
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-11-11 15:32:53 -08:00
Kasra Bigdeli 4801585c76 Merge pull request #2353 from caprover/release
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
Release backmerge
2025-11-11 00:51:01 -08:00
Kasra Bigdeli 3589547dbc Updated Docker API version 2025-11-11 00:22:32 -08:00
Kasra Bigdeli 2e121e8e0c Updated Docker API version 2025-11-11 00:20:19 -08:00
Kasra Bigdeli 78a9b0ce6f Updated Docker API version 2025-11-11 00:12:54 -08:00
Kasra Bigdeli 6fe86982bc adding report for unused fields so that we can better prioritize adding support 2025-10-13 22:50:21 -07:00
Alex Hoyau be5d55d4ce Allow numbers in project name, fix #2130 2025-09-29 14:41:41 +02:00
Kasra Bigdeli 5e4f08db1c Allowing docker compose deploys 2025-09-10 22:49:30 -07:00
Kasra Bigdeli 1b89d9123b Merge pull request #2336 from R3D347HR4Y/excludelogsfrombackups
FIX - Deletes the shared-logs from the copied /captain/data folder upon a backup of the config
2025-09-09 22:02:06 -07:00
Kasra Bigdeli e902762809 Fied build
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-09-06 21:58:08 -07:00
Kasra Bigdeli fa2f251db1 Added autocleanup for backend jobs 2025-09-06 21:55:25 -07:00
Kasra Bigdeli 15595a6a62 updated formatting 2025-09-06 19:34:23 -07:00
Kasra Bigdeli 9caba312a1 updated API to use array 2025-09-06 19:32:14 -07:00
R3D347HR4Y 2664437159 Update BackupManager.ts 2025-09-06 09:35:35 +02:00
R3D347HR4Y 38096fff15 FIX - Deletes the shared-logs from the copied /captain/data folder upon a backup of the config 2025-09-05 12:34:49 +02:00
Kasra Bigdeli e098ba900b Fixing regression bugs 2025-09-03 22:33:39 -07:00
Kasra Bigdeli 0fa8643fae Moved uploadCaptainDefinitionContent to handler-- backend is almost done 2025-09-02 23:42:26 -07:00
Kasra Bigdeli a0247e068e Moved updateConfigAndSave to handler 2025-09-02 23:33:45 -07:00
Kasra Bigdeli c3abec0367 Moved GetAllApps to handler 2025-09-02 23:18:48 -07:00
Kasra Bigdeli 6a35863cd3 Fixed register project in one click app handler 2025-09-02 23:10:33 -07:00
Kasra Bigdeli b592ebed6e Unify the definiton of handler resp 2025-09-02 23:06:24 -07:00
Kasra Bigdeli ef3a4db51f updated project handler 2025-09-02 23:02:33 -07:00
Kasra Bigdeli c07a202523 Moved register app to handler 2025-09-02 22:57:29 -07:00
Kasra Bigdeli 80fe613b0f update 2025-09-01 21:52:09 -07:00
Kasra Bigdeli 61d157fdae skeleton 2025-09-01 21:48:30 -07:00
Kasra Bigdeli 7abb1c00a6 Closed https://github.com/caprover/caprover/issues/2326 2025-08-15 20:24:00 -07:00
raisercostin 47a5d8fa19 The serviceExposedPort is only used in the template/root-nginx-conf.ejs and should be the container port that is 3000 (used inside swarm). - https://github.com/search?q=repo%3Acaprover%2Fcaprover+serviceExposedPort&type=code
Continues on https://github.com/caprover/caprover/pull/2220 .

Currently nginx cannot forward traffic to admin/3000 port (is using the one defined in configs.adminPortNumber3000).
2025-06-29 10:53:13 +03:00
Kasra Bigdeli f56f3366a3 ExpressJS version up fix 2025-06-22 17:58:08 -07:00
Kasra Bigdeli bc982a4f5c Preparing release
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-06-07 23:13:20 -07:00
Kasra Bigdeli ef8d0a3b70 Updated deps 2025-05-26 19:23:35 -07:00
Kasra Bigdeli e121f65763 Remove indefinite option
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-05-26 14:36:31 -07:00
Kasra Bigdeli 7813f2f172 Closes https://github.com/caprover/caprover/issues/2293
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-04-26 10:37:46 -07:00
Douglas Nassif Roma Junior 661054eab9 Code formatting 2025-03-31 17:49:53 -03:00
Douglas Nassif Roma Junior a394dddaf1 Enhance SSH_PATH_RE on GitHelper to improve URL parsing 2025-03-31 10:24:52 -03:00
Kasra Bigdeli 0c45bd2f22 Fixed https://github.com/caprover/caprover/issues/2261
Run build / build (push) Waiting to run
Run formatter / check-code-formatting (push) Waiting to run
Run lint / run-lint (push) Waiting to run
Build and push the edge image / run-pre-checks (push) Waiting to run
Build and push the edge image / build-publish-docker-hub (push) Blocked by required conditions
2025-02-16 20:34:05 -08:00
Kasra Bigdeli b8658b4f6a Removed debugging lines
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled
2025-01-20 12:52:53 -08:00
Kasra Bigdeli 017bcca3c8 Fixed redirect issue
Run build / build (push) Waiting to run
Run formatter / check-code-formatting (push) Waiting to run
Run lint / run-lint (push) Waiting to run
Build and push the edge image / run-pre-checks (push) Waiting to run
Build and push the edge image / build-publish-docker-hub (push) Blocked by required conditions
2025-01-20 12:52:01 -08:00
Kasra Bigdeli 84804ae766 Add debugging to fix the healthcheck 2025-01-20 09:50:38 -08:00
Kasra Bigdeli 07ac95cf40 Add debugging to fix the healthcheck 2025-01-20 09:25:43 -08:00
Kasra Bigdeli 6cb3274195 fixed https://github.com/caprover/caprover/issues/2240
Run build / build (push) Waiting to run
Run formatter / check-code-formatting (push) Waiting to run
Run lint / run-lint (push) Waiting to run
Build and push the edge image / run-pre-checks (push) Waiting to run
Build and push the edge image / build-publish-docker-hub (push) Blocked by required conditions
2025-01-19 08:59:25 -08:00