Commit graph

335 commits

Author SHA1 Message Date
Andras Bacsai
33f3a0b100
fix(git): write deploy key to per-deployment path, not root's id_rsa (#10440) 2026-06-03 15:09:45 +02:00
Andras Bacsai
e39a9ad827 fix(git): use deploy key path for PR fetches 2026-06-03 14:39:05 +02:00
Andras Bacsai
08735e6cc8 feat(postgres): add internal database upgrade script
Publish upgrade-postgres.sh with install and upgrade flows, include the
PostgreSQL compose override when present, and sync the script to BunnyCDN.
2026-06-03 14:27:01 +02:00
Andras Bacsai
3eb5463e3e Merge remote-tracking branch 'origin/next' into fix/deploy-key-dedicated-path-race 2026-06-03 14:00:34 +02:00
Andras Bacsai
c329749c74
fix(logs): html tags is removed in log viewer (#10346) 2026-06-03 13:40:53 +02:00
Andras Bacsai
9dabaabdf1 fix(git): force HTTP/1.1 for repository imports
Apply HTTP/1.1 transport config to HTTPS git clone and submodule commands,
including GitHub App credential rewrites, to avoid flaky large repo imports.
2026-06-03 12:42:04 +02:00
Andras Bacsai
cb6a2de529 chore(logs): simplify log viewer XSS tests 2026-06-03 12:28:56 +02:00
Andras Bacsai
9aa40bb5f0 Merge remote-tracking branch 'origin/next' into jean/allow-dots-username 2026-06-03 11:38:55 +02:00
Andras Bacsai
bc2afdf02e fix(server): share SSH username validation
Centralize SSH username rules and sanitization so dotted usernames are
accepted consistently across API, onboarding, and Livewire server forms.
2026-06-03 11:38:48 +02:00
Andras Bacsai
07f381b88c Merge remote-tracking branch 'origin/next' into jean/port-exposes-improvement 2026-06-03 10:32:57 +02:00
Ömer Faruk ŞAHİN
903f7a7177
Merge branch 'next' into fix/deploy-key-dedicated-path-race 2026-06-03 10:28:34 +03:00
Andras Bacsai
d681e656c7 fix(server): preserve remote HOME in Railpack buildx prune 2026-06-02 16:36:00 +02:00
Andras Bacsai
a75dc07567 fix(server): prune Railpack buildx cache via helper container 2026-06-02 15:14:01 +02:00
Andras Bacsai
5eec212ade fix(deploy): persist Railpack buildx metadata
Mount the host buildx metadata directory into helper containers so the
Railpack builder can be pruned during Docker cleanup.
2026-06-02 14:30:49 +02:00
Andras Bacsai
40294bc3b3 chore: inspect staged changes 2026-06-02 14:05:26 +02:00
Andras Bacsai
fb4c3aa22e fix(applications): allow repeated hyphens in image names 2026-06-02 11:27:25 +02:00
Andras Bacsai
6dae53a0e5 Merge remote-tracking branch 'origin/next' into fix/application-image-validation 2026-06-02 11:13:36 +02:00
Andras Bacsai
d72c1e2a47 fix(applications): harden image validation 2026-06-02 11:11:33 +02:00
Andras Bacsai
51894d9c05 chore: defer server policy changes 2026-06-02 10:57:14 +02:00
Andras Bacsai
419593e7d4 fix(proxy): tighten config validation 2026-06-01 15:14:28 +02:00
Andras Bacsai
4b2dfa7c77 Merge remote-tracking branch 'origin/next' into 2731-investigate-failed-git-clone 2026-06-01 11:44:09 +02:00
Andras Bacsai
92d6b577fd Merge remote-tracking branch 'origin/next' into 7616-conditional-image-tags 2026-06-01 11:15:55 +02:00
Andras Bacsai
e7483f591f fix(deployments): scope submodule git credentials per command
Use per-command git config for GitHub App HTTPS credentials so private submodules authenticate without persisting global git config. Preserve configured git options for checkout, fetch, submodule, and LFS commands, and cover GitLab PR submodule checkout with tests.
2026-06-01 10:54:14 +02:00
Andras Bacsai
bc8928fdc4 Merge remote-tracking branch 'origin/next' into 2731-investigate-failed-git-clone 2026-06-01 10:40:02 +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
c5fbf78bd8 fix(database): quote S3 restore temp paths
Escape generated restore file paths before composing docker and shell cleanup commands so paths with spaces or metacharacters cannot break command execution. Update import form security coverage to target ImportForm directly.
2026-05-29 12:27:33 +02:00
Andras Bacsai
bbbd46ca26 fix(database): always include MongoDB archive path in restores 2026-05-29 08:27:45 +02:00
Ömer Faruk ŞAHİN
ddd84e5adc fix(git): write deploy key to per-deployment path, not root's id_rsa 2026-05-28 19:13:29 +03:00
Andras Bacsai
dd8a0d501d fix(s3): cap connection checks at 15 seconds
Return a friendly timeout error for failed S3 endpoint checks while
preserving the original exception as the previous throwable.
2026-05-28 17:31:11 +02:00
Andras Bacsai
b751628545 fix(database): normalize read/write host lists
Trim comma-separated database host values and fall back to DB_HOST or the default host when write hosts are empty. Add unit coverage for read/write host parsing.
2026-05-26 14:52:25 +02:00
Andras Bacsai
ebf23f4874 fix(ssh): escape scp source and destination
Quote SCP operands when building commands to prevent shell injection through source or destination paths, and cover the escaping behavior in the SSH command injection tests.
2026-05-26 13:48:10 +02:00
ShadowArcanist
bd744eb8dd
fix(ui): configuration changes modal values, colors and spacing 2026-05-22 21:22:50 +05:30
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 Bacsai
fde500a347 fix(templates): require Docmost mail driver
Require MAIL_DRIVER to be set before Docmost starts and add a unit test to keep the compose template and generated service templates in sync.
2026-05-15 13:36:02 +02:00
Andras Bacsai
a54e70b4e0 fix(deployments): skip registry image tag for previews
Only push the configured Docker registry image tag for production deployments, and cover preview and missing-tag cases with unit tests.
2026-05-13 11:49:15 +02:00
Andras Bacsai
f8849aba73 feat(deployments): track application configuration diffs
Store deployment configuration snapshots on application deployment queues and compare them against the current application state. Surface grouped pending changes in the configuration checker and use build-impact diffs to decide when an existing image can skip the build step.
2026-05-13 09:58:58 +02:00
Andras Bacsai
63c2d31ca0 feat(applications): add configurable stop grace period
Add centralized stop grace period resolution for application settings and use it across manual stops, preview stops, and deployments. Validate the Livewire advanced setting against shared min/max constants and cover persistence, fillable creation, and fallback behavior with tests.
2026-05-11 23:43:53 +02:00
Andras Bacsai
d1220895d9 Merge remote-tracking branch 'origin/next' into feat/configurable-stop-grace-period 2026-05-11 23:20:31 +02:00
Andras Bacsai
ab1958d741 fix(railpack): fail fast when buildx is unavailable
Require Docker buildx before Railpack builds, normalize environment
variable keys before validation, and align private deploy key API docs with
the supported dockerfile build pack.
2026-05-11 17:31:29 +02:00
Andras Bacsai
b5ff124446 fix(env): validate Docker-compatible variable keys
Add shared environment variable key validation and normalization for Livewire forms and models, allowing Docker-compatible keys while rejecting invalid entries such as keys containing equals signs. Also quote Railpack build environment and secret arguments safely.
2026-05-11 15:43:09 +02:00
Andras Bacsai
d5946dcfca fix(railpack): include scoped env vars in builds
Build Railpack variables from generic build-time vars plus Railpack-specific vars, filter unrelated buildpack control vars, and ensure curl/wget deploy apt packages are present. Add coverage for standard and preview deployments.
2026-05-11 13:29:21 +02:00
Andras Bacsai
9f380b8495 Merge remote-tracking branch 'origin/next' into feat/railpack 2026-05-11 10:58:13 +02:00
Andras Bacsai
c6ac52dc38 fix(env): generate encoded secrets from raw random bytes
Use random_bytes before hex and base64 encoding so generated env values
match the expected decoded byte lengths. Add Pest coverage for HEX and
REALBASE64 magic variables.
2026-05-09 14:49:39 +02:00
Andras Bacsai
fe934dd139 Merge remote-tracking branch 'origin/next' into feat/railpack 2026-05-06 14:33:22 +02:00
Andras Bacsai
b6ca6b1b20 feat(railpack): expose COOLIFY_* vars at build time and generalize buildpack control flag
Mirrors Nixpacks behavior: inject COOLIFY_* and SOURCE_COMMIT into
railpack build variables so apps (e.g. SPAs baking public URLs) can
read them via /run/secrets/<KEY>.

Rename is_nixpacks → is_buildpack_control to cover both NIXPACKS_ and
RAILPACK_ prefixed keys. Update the env variable view and appends list
accordingly.

Promote generate_coolify_env_variables to protected for testability.
2026-04-30 18:31:41 +02:00
Andras Bacsai
ace643d3d8 fix(railpack): query buildtime env vars directly instead of via computed attribute
Replace `railpack_environment_variables_collection()` helper (which returned
pre-filtered Eloquent attribute collections) with inline queries on
`environment_variables()` / `environment_variables_preview()` filtered by
`is_buildtime`. This ensures Railpack build variables are sourced from the
same query path as the rest of the deployment pipeline and avoids relying on
a now-removed accessor that silently included all railpack vars regardless of
build context.
2026-04-30 16:38:58 +02:00
Andras Bacsai
ec71d33f5e fix(railpack): pin frontend image version via config constant
Remove RAILPACK_FRONTEND_IMAGE env var from helper Dockerfile and resolve
the image ref at runtime using a new `railpack_version` constant in config.
Eliminates Docker build-time env interpolation for BUILDKIT_SYNTAX arg.
2026-04-30 16:27:08 +02:00
Andras Bacsai
79174b749d refactor(helpers): extract STANDALONE_DATABASE_MODELS registry, add tests
Replace 8× repeated per-type if-blocks in `queryDatabaseByUuidWithinTeam`
and `queryResourcesByUuid` with a single loop over the new
`STANDALONE_DATABASE_MODELS` constant.

Add unit tests to guard the registry against drift (keys mirror
`DATABASE_TYPES`, every entry is a valid Eloquent model with `team()`),
and feature tests covering team-ownership, wrong-team, and unknown-UUID
cases for `queryDatabaseByUuidWithinTeam`.
2026-04-30 14:48:48 +02:00
Andras Bacsai
b8e311622a Merge remote-tracking branch 'origin/next' into feat/railpack 2026-04-29 15:22:47 +02:00
Andras Bacsai
46180dbbf9 feat(webhook): skip deployment on [skip ci]/[skip cd] commit markers
Add DetectsSkipDeployCommits trait with two strategies: shouldSkipDeploy
(all commits must contain the marker) for push events, and
shouldSkipDeployAny (any single marker triggers skip) for PR/MR titles
and latest-commit signals.

Apply trait to Bitbucket, Gitea, GitHub, GitLab webhook controllers and
ProcessGithubPullRequestWebhook job. PRs pass pullRequestTitle through
to the job constructor for evaluation.
2026-04-29 09:12:24 +02:00