Commit graph

174 commits

Author SHA1 Message Date
Andras Bacsai
2eeb2b94ec fix: auto-inject -f and --env-file flags into custom Docker Compose commands 2025-11-18 14:54:21 +01:00
Andras Bacsai
919fc184b7 fix(docker): improve pull request ID check in container status function 2025-11-09 20:35:03 +01:00
Andras Bacsai
67605d50fc fix(deployment): prevent base deployments from being killed when PRs close (#7113)
- Fix container filtering to properly distinguish base deployments (pullRequestId=0) from PR deployments
- Add deployment cancellation when PR closes via webhook to prevent race conditions
- Prevent CleanupHelperContainersJob from killing active deployment containers
- Enhance error messages with exit codes and actual errors instead of vague "Oops" messages
- Protect status transitions in finally blocks to ensure proper job failure handling
2025-11-09 14:41:35 +01:00
Andras Bacsai
1ab5dbca20 fix: preserve empty strings and remove empty sections in docker-compose
- Preserve empty string environment variables instead of converting to null
  Empty strings and null have different semantics in Docker Compose:
  * Empty string (VAR: ""): Variable is set to "" in container (e.g., HTTP_PROXY="" means "no proxy")
  * Null (VAR: null): Variable is unset/removed from container environment

- Remove empty top-level sections (volumes, configs, secrets) from generated compose files
  These sections now only appear when they contain actual content, following Docker Compose best practices

- Add safety check for missing volumes in validateComposeFile to prevent iteration errors

- Add comprehensive unit tests for both fixes

Fixes #7126
2025-11-06 12:30:03 +01:00
Andras Bacsai
70f152f0ba Changes auto-committed by Conductor 2025-10-16 08:51:15 +02:00
Andras Bacsai
ed07e662ea
Update bootstrap/helpers/docker.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-15 14:51:36 +02:00
Andras Bacsai
41afa9568d fix: handle null environment variable values in bash escaping
Previously, the bash escaping functions (`escapeBashEnvValue()` and `escapeBashDoubleQuoted()`) had strict string type hints that rejected null values, causing deployment failures when environment variables had null values.

Changes:
- Updated both functions to accept nullable strings (`?string $value`)
- Handle null/empty values by returning empty quoted strings (`''` for single quotes, `""` for double quotes)
- Added 3 new tests to cover null and empty value handling
- All 29 tests pass

This fix ensures deployments work correctly even when environment variables have null values, while maintaining the existing behavior for all other cases.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 13:35:58 +02:00
Andras Bacsai
acf2d5f89b refactor(deployment): update environment variable handling for Docker builds
- Changed the .env file reference to use a build-time .env file located in /artifacts, preventing it from being included in Docker images.
- Introduced a new method to wrap Docker build commands with environment variable exports, enhancing the handling of build-time variables.
- Updated logging messages for clarity regarding the creation and usage of the build-time .env file.
2025-10-06 10:31:58 +02:00
Andras Bacsai
aadde3a83e feat(deployments): enhance Docker build argument handling for multiline variables
- Introduced new helper functions to generate Docker build arguments and environment flags, accommodating multiline variables with proper escaping.
- Updated the ApplicationDeploymentJob to utilize these new functions, improving the handling of environment variables during deployment.
- Added comprehensive tests to ensure correct behavior for multiline variables and special characters.
2025-10-02 13:54:36 +02:00
Andras Bacsai
c1799bdae6 fix(docker): redirect stderr to stdout for container log retrieval to capture error messages 2025-09-18 12:51:03 +02:00
Andras Bacsai
133e72336a Revert "refactor(file-transfer): replace base64 encoding with direct file transfer method in various components for improved clarity and efficiency"
This reverts commit feacedbb04.
2025-09-15 17:56:48 +02:00
Andras Bacsai
feacedbb04 refactor(file-transfer): replace base64 encoding with direct file transfer method in various components for improved clarity and efficiency 2025-09-09 11:10:38 +02:00
Andras Bacsai
2e85ce0e0e refactor(urls): replace generateFqdn with generateUrl for consistent URL generation across applications 2025-08-28 09:49:58 +02:00
Andras Bacsai
21fc1ba254 fix(docker): update parser version in FQDN generation for service-specific URLs 2025-08-27 17:02:38 +02:00
Andras Bacsai
e8892b3d29 feat(core): finally fqdn is fqdn and url is url. haha 2025-08-12 10:06:19 +02:00
Yanluis Fermin
e572017d27
fix(api): duplicated logs in application endpoint (#6292) 2025-08-11 14:03:46 +02:00
Andras Bacsai
b7602e30b3 fix(docker): conditionally enable gzip compression in Traefik labels based on configuration 2025-06-25 13:11:44 +02:00
Andras Bacsai
842f22340e refactor(database-detection): enhance isDatabaseImage function to utilize service configuration for improved detection accuracy 2025-06-04 11:44:37 +02:00
Andras Bacsai
698b090b4d fix(docker): ensure correct parsing of environment variables by limiting explode to 2 parts 2025-05-22 14:27:55 +02:00
Andras Bacsai
08d2ad83ee fix(docker): enhance hostname and GPU option validation in Docker run to compose conversion 2025-04-23 13:34:27 +02:00
Andras Bacsai
04e1d5c75d fix(docker): ensure password hashing only occurs when HTTP Basic Authentication is enabled 2025-04-23 13:30:27 +02:00
Andras Bacsai
78ef80f800 refactor 2025-04-23 13:22:01 +02:00
Andras Bacsai
e4648bcf9c feat(docker): add HTTP Basic Authentication support and enhance hostname parsing in Docker run conversion 2025-04-23 11:57:26 +02:00
Andras Bacsai
8520beff51 refactor(docker): remove debug statement and enhance hostname handling in Docker run conversion 2025-04-23 11:21:37 +02:00
Andras Bacsai
bce8bb1f2d
Merge branch 'next' into add-hostname 2025-04-22 22:03:45 +02:00
Andras Bacsai
9e608f7ba5 refactor(http-basic-auth): rename 'http_basic_auth_enable' to 'http_basic_auth_enabled' across application files for consistency 2025-04-22 21:30:27 +02:00
Andras Bacsai
7e0373e439
Merge branch 'next' into feat/add-http-basic-auth 2025-04-22 21:18:43 +02:00
Andras Bacsai
6d12e7edc7 refactor(database): simplify database type checks in ServiceDatabase and enhance image validation in Docker helper 2025-04-21 09:57:27 +02:00
Christopher Kaster
2634f516d5
feat: Add HTTP Basic Authentication 2025-04-17 14:14:32 +02:00
sebi
4f5df53f1f add hostname 2025-04-04 18:39:52 +01:00
Andras Bacsai
98add9fd0f refactor(docker): parse and sanitize YAML compose file before encoding 2025-03-28 21:11:28 +01:00
Andras Bacsai
a402c28606 fix(revert): label parsing 2025-02-28 20:25:19 +01:00
Andras Bacsai
1c21652d5d fix(core): Improve label generation and merging for applications and services 2025-02-28 12:44:20 +01:00
Andras Bacsai
e1c5ace342 fix(docker): Improve Docker compose file validation process
- Increase UUID length for better uniqueness
- Add server existence check before validation
- Implement cleanup of temporary compose file in finally block
2025-02-27 12:17:12 +01:00
Andras Bacsai
27e4882d57 feat(core): You can validate compose files with docker compose config
fix(core): labels are now accepted with both compose styles
refactor: remove lots of ray's
2025-02-27 11:29:04 +01:00
Vann
7b60d76b77 feat: remove ansi color from log 2025-02-02 10:01:01 +00:00
Vann
e7988fc295 feat: container logs 2025-02-01 17:21:38 +00:00
Andras Bacsai
5403fa7c71 feat: add database subtype 2024-12-18 12:56:06 +01:00
Andras Bacsai
340075a684
Merge pull request #4324 from JuliensForks/main
feat: add some new labels to every container
2024-12-18 12:55:33 +01:00
Julien
0d5d5537be refactor: rename coolify.environment to coolify.environmentName 2024-12-08 12:46:42 +01:00
Andras Bacsai
e67a93e6a5 feat: able to deploy without cache on every commit 2024-12-05 10:46:27 +01:00
Julien
1086aea54d feat: add coolify.environment label 2024-12-02 18:38:47 +01:00
🏔️ Peak
e6ea4a0199
Merge pull request #4257 from konstchri/caddy_stripprefix_fix
Caddy stripprefix fix
2024-11-25 14:03:47 +01:00
Andras Bacsai
37d4d5f98c fix: version should come from constants + fix stripe webhook error reporting 2024-11-25 11:28:08 +01:00
Julien
8b30123add feat: add service/resource/project labels 2024-11-17 23:06:05 +01:00
peaklabs-dev
2475875f97
fix mino and logto 2024-11-15 17:59:11 +01:00
peaklabs-dev
bf6222e5a0
fix ghost 2024-11-14 12:02:39 +01:00
konstchri
c1719a3bba
Merge branch 'next' into caddy_stripprefix_fix 2024-11-12 19:45:17 +02:00
Konstantinos Christoforou
1a27196e1a fix typo 2024-11-12 19:22:07 +02:00
konstchri
85d0728322
[Fix]: Caddy docker labels do not honor "strip prefix" option 2024-11-12 16:21:45 +02:00