12 Commits
Author SHA1 Message Date
Kasra Bigdeli 2e3fa37343 Support standard Docker Compose command/entrypoint semantics and One-Click v5 catalog (#2561)
* Support standard Docker Compose command/entrypoint semantics and One-Click v5 catalog

* Address PR review: simplify helpers/tests, reject NUL args, validate template response

* Address follow-up PR comments and wire Docker Swarm test into CI
2026-11-30 22:33:18 -08:00
Kasra Bigdeli 9d2320ac5b Fix One-Click dependency ordering for mapping-form depends_on (#2560)
* fix: allow mapping-form depends_on in service type

* fix: sort mapping-form service dependencies by key

* test: cover list and mapping-form dependency ordering
2026-11-22 10:26:49 -08:00
hanming5 715a75470a Restore option B for one-click value escaping
As requested in review, keep the existing substitution for values that
are already valid JSON string contents and only escape values that
would fail to parse. Escaping every value broke overrides escaped by
hand, such as {\"text\":\"hello\"} with an empty default, which master
passes as {"text":"hello"}.

Add a regression test for that case, and expect the existing decoding
for the path and regex cases that contain valid JSON escapes.
2026-11-19 13:43:54 +09:00
hanming5 0f1852c890 Only unescape hand-escaped quotes in unchanged template defaults
Unescaping \" in every value turned a backslash-quote pair typed by a
user, such as C:\data\"secret, into a plain quote. Keep every entered
value as is, and only unescape \" when the value is the variable's
unchanged default, which is where templates such as remark42 escape
quotes by hand.
2026-11-12 14:57:48 +09:00
hanming5 991f5c7676 Keep one-click values as entered, except hand-escaped quotes
Values that were already valid inside a JSON string were inserted
as-is, so backslash sequences such as \n in C:\new or \b in a regex
were still decoded. JSON-escape every value instead, and only unescape
\" first, which the remark42 template and the workaround from #1328
rely on. Values are converted to strings first because the deploy
route does not enforce string values.
2026-11-12 14:48:22 +09:00
hanming5 a99735576b Escape one-click variable values that are not valid in a JSON string
One-click values are inserted into the stringified template without
escaping, so a value containing a quote, a newline or a stray
backslash made the template fail to parse. Escape such values before
inserting them. Values that are already valid inside a JSON string,
including values escaped by hand such as \", are inserted unchanged so
existing templates keep working.

Fixes caprover/caprover-frontend#104
2026-11-09 13:45:45 +09:00
Kasra Bigdeli 7db7638c19 test: cover compose deployment without app name 2026-10-31 08:39:02 -07:00
Kasra Bigdeli 4f4e9d81b9 Preserve legacy mount suffixes and share volume name validation 2026-10-18 22:21:13 -07:00
Kasra Bigdeli 34fe9d9beb Report exact Compose field paths and validate service mappings 2026-10-18 22:15:58 -07:00
Kasra Bigdeli 771fe25a0e Accept Compose environment lists and long-form mounts and ports 2026-10-18 22:10:07 -07:00
cevheri be9192c5f5 fix: check one-click app names before creating anything
A one-click deploy with more than one service checked each app name only
when it registered that app. A later name that was too long or already
taken failed after the project and the earlier apps were created, and
those stayed behind. Check every name before the first step instead, and
say the length limit in the error.

Fixes #2504
2026-10-05 12:53:04 +03:00
Kasra Bigdeli a44a1be950 test: cover one-click deploy without values 2026-09-22 18:48:17 -07:00