Commit graph

1152 commits

Author SHA1 Message Date
Andras Bacsai
334559bb0b Update bootstrap/helpers/parsers.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-10-16 09:51:37 +02:00
Andras Bacsai
cb1f571eb4 fix: prevent command injection in Docker Compose parsing - add pre-save validation
This commit addresses a critical security issue where malicious Docker Compose
data was being saved to the database before validation occurred.

Problem:
- Service models were saved to database first
- Validation ran afterwards during parse()
- Malicious data persisted even when validation failed
- User saw error but damage was already done

Solution:
1. Created validateDockerComposeForInjection() to validate YAML before save
2. Added pre-save validation to all Service creation/update points:
   - Livewire: DockerCompose.php, StackForm.php
   - API: ServicesController.php (create, update, one-click)
3. Validates service names and volume paths (string + array formats)
4. Blocks shell metacharacters: backticks, $(), |, ;, &, >, <, newlines

Security fixes:
- Volume source paths (string format) - validated before save
- Volume source paths (array format) - validated before save
- Service names - validated before save
- Environment variable patterns - safe ${VAR} allowed, ${VAR:-$(cmd)} blocked

Testing:
- 60 security tests pass (176 assertions)
- PreSaveValidationTest.php: 15 tests for pre-save validation
- ValidateShellSafePathTest.php: 15 tests for core validation
- VolumeSecurityTest.php: 15 tests for volume parsing
- ServiceNameSecurityTest.php: 15 tests for service names

Related commits:
- Previous: Added validation during parse() phase
- This commit: Moves validation before database save

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 09:51:37 +02: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
ce12c94709 fix: prevent duplicate services on image change and enable real-time UI refresh
This commit addresses two critical issues with Docker Compose service management:

## Issue 1: Duplicate Services Created on Image Change
When changing the image in a docker-compose file, the parser was creating new
ServiceApplication/ServiceDatabase records instead of updating existing ones.

**Root Cause**: The parsers used `firstOrCreate()` with `['name', 'image', 'service_id']`,
meaning any image change would create a new record.

**Fix**: Remove `image` from `firstOrCreate()` queries and update it separately after
finding or creating the service record.

**Changes**:
- `bootstrap/helpers/parsers.php` (serviceParser v3): Fixed in presave loop (lines 1188-1203)
  and main parsing loop (lines 1519-1539)
- `bootstrap/helpers/shared.php` (parseDockerComposeFile v2): Fixed null check logic
  (lines 1308-1348)

## Issue 2: UI Not Refreshing After Changes
When compose file or domain was modified, the Configuration component wasn't receiving
events to refresh its data, requiring manual page refresh to see updates.

**Root Cause**: The Configuration component wasn't listening for refresh events dispatched
by child components (StackForm, EditDomain).

**Fix**: Add event listeners and dispatchers to enable real-time UI updates.

**Changes**:
- `app/Livewire/Project/Service/Configuration.php`: Added listeners for `refreshServices`
  and `refresh` events (lines 36-37)
- `app/Livewire/Project/Service/EditDomain.php`: Added `refreshServices` dispatch (line 76)
- Note: `app/Livewire/Project/Service/StackForm.php` already had the dispatch

## Tests Added
- `tests/Unit/ServiceParserImageUpdateTest.php`: 4 tests verifying no duplicates created
- `tests/Unit/ServiceConfigurationRefreshTest.php`: 4 tests verifying event dispatching

All 8 new tests pass, and all existing unit tests continue to pass.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 10:12:36 +02:00
Andras Bacsai
2c64136503 feat(backup): enhance backup job with S3 upload handling and notifications
- Introduced a new notification class, BackupSuccessWithS3Warning, to alert users when local backups succeed but S3 uploads fail.
- Updated DatabaseBackupJob to track local backup success and handle S3 upload errors, improving error reporting and user notifications.
- Modified ScheduledDatabaseBackupExecution model to include a new s3_uploaded boolean field for tracking S3 upload status.
- Adjusted views and validation logic to reflect changes in backup execution status and S3 handling.
- Added tests to ensure the new s3_uploaded column is correctly implemented and validated.
2025-10-07 15:02:23 +02:00
Andras Bacsai
cef3d3af5d feat(proxy): enhance proxy configuration regeneration by extracting custom commands
- Added a new function to extract custom proxy commands from existing Traefik configurations before regenerating the proxy configuration.
- Updated the proxy configuration generation logic to include these custom commands, ensuring they are preserved during regeneration.
- Introduced unit tests to validate the extraction of custom commands and handle various scenarios, including invalid YAML and different proxy types.
2025-10-07 11:11:13 +02:00
Andras Bacsai
141199b41f
Merge pull request #6764 from djsisson/bitnami
update bitnami to bitnamilegacy
2025-10-06 11:07:38 +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
Darren Sisson
fb7af48b10
update bitnami to bitnamilegacy 2025-10-03 15:48:11 +01:00
Andras Bacsai
f8e97501ce feat(deployments): generate SERVICE_NAME environment variables from Docker Compose services
- Added functionality to generate environment variables for each service defined in the Docker Compose file, transforming service names into uppercase and replacing special characters.
- Updated the service parser to merge these generated variables with existing environment variables, enhancing deployment configuration.
2025-10-03 09:41:59 +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
a03c1b3b4b refactor(dashboard): remove deployment loading logic and introduce DeploymentsIndicator component for better UI management 2025-09-30 11:43:30 +02:00
Sepcnt
dcca834113
Merge branch 'next' into next 2025-09-25 20:42:54 +08:00
Andras Bacsai
708a08fdd6 fix(application): enhance domain handling by replacing both dots and dashes with underscores for HTML form binding 2025-09-25 13:19:12 +02:00
Andras Bacsai
36dfd1bc6e refactor(github): enhance API request handling and validation
- Updated validation rules for 'custom_user' and 'custom_port' fields to be nullable in the GithubController.
- Refactored API request handling in GithubController, GithubPrivateRepository, and helper functions to use a consistent Http::GitHub method with timeout and retry logic.
- Improved error handling for repository and branch loading processes.
2025-09-22 15:41:56 +02:00
Andras Bacsai
b90ff0e09a refactor(remoteProcess): remove redundant file transfer functions for improved clarity 2025-09-22 12:54:37 +02:00
Andras Bacsai
bb0cdefa35
Merge branch 'next' into feat/improve-network-mode-check 2025-09-22 12:31: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
60e31a1381 refactor(remoteProcess): remove file transfer handling from remote_process and instant_remote_process functions to simplify code 2025-09-15 17:59:35 +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
393745b68c Revert "refactor(file-transfer): replace base64 encoding with direct file transfer method across multiple database actions for improved clarity and efficiency"
This reverts commit 18068857b1.
2025-09-15 17:55:08 +02:00
Andras Bacsai
3255f42385 refactor(remoteProcess): remove command log comments for file transfers to simplify code 2025-09-15 15:39:27 +02:00
Andras Bacsai
77c7da39e2 feat(deployment): enhance deployment status reporting with detailed information on active deployments and team members 2025-09-15 14:10:20 +02:00
Sepcnt
a03de180f5
Merge branch 'next' into next 2025-09-15 16:59:57 +08:00
Andras Bacsai
5b3b4bbc43 refactor(environment): remove 'is_build_time' attribute from environment variable handling across the application to simplify configuration 2025-09-11 16:51:56 +02:00
Andras Bacsai
501e6a2650 refactor(environment): standardize service name formatting by replacing '-' and '.' with '_' in environment variable keys 2025-09-11 13:59:02 +02:00
Andras Bacsai
5e0b86f322
Merge pull request #6170 from mindedtech/Add-SERVICE_NAME-variable-for-docker-compose-services
Add SERVICE_NAME variable for docker compose services
2025-09-11 13:06:10 +02:00
Andras Bacsai
ff29525dd9 refactor(clone): enhance application cloning by separating production and preview environment variable handling 2025-09-11 12:52:35 +02:00
Andras Bacsai
6ed2fd5d66 refactor(clone): integrate preview cloning logic directly into application cloning function for improved clarity and maintainability 2025-09-11 12:29:49 +02:00
Andras Bacsai
e74da06465 refactor(clone): consolidate application cloning logic into a dedicated function for improved maintainability and readability 2025-09-11 10:38:08 +02:00
Andras Bacsai
d10e4fa388 refactor(deployment): streamline next deployment queuing logic by repositioning queue_next_deployment call 2025-09-10 13:26:35 +02:00
Andras Bacsai
f18dff186d refactor(remoteProcess): remove debugging statement from transfer_file_to_container function for cleaner code 2025-09-10 13:25:23 +02:00
Andras Bacsai
b6113839ec refactor(deployment): enhance queuing logic to support concurrent deployments by including pull request ID in checks 2025-09-10 12:49:42 +02:00
Andras Bacsai
52312e9de6 refactor(github-webhook): restructure application processing by grouping applications by server for improved deployment handling 2025-09-10 09:30:43 +02:00
sepcnt
45a7370b55 fix(socialite): add custom base URL support for GitLab provider in OAuth settings 2025-09-09 21:47:02 +08:00
Andras Bacsai
1ca94b90da fix(proxy): replace CheckConfiguration with GetProxyConfiguration and SaveConfiguration with SaveProxyConfiguration for improved clarity and consistency in proxy management 2025-09-09 12:52:19 +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
ad58dfc62e feat(sudo-helper): add helper functions for command parsing and ownership management with sudo 2025-09-09 09:00:42 +02:00
Andras Bacsai
a7671ed379 refactor(dns-validation): rename DNS validation functions for consistency and clarity, and remove unused code 2025-09-09 09:00:35 +02:00
Andras Bacsai
ccc9ceb734 refactor(remoteProcess): remove debugging statement from transfer_file_to_server function to clean up code 2025-09-09 08:56:16 +02:00
Arnaud B
e23ab1e621
feat(deployment): add SERVICE_NAME variables for service discovery
This change introduces automatically generated `SERVICE_NAME_<SERVICE>`
environment variables for each service within a Docker Compose deployment.
This allows services to reliably reference each other by name, which is particularly
useful in pull request environments where container names are dynamically suffixed.

- The application parser now generates and injects these `SERVICE_NAME` variables
   into the environment of all services in the compose file.
- `ApplicationDeploymentJob` is updated to correctly handle and filter these
  new variables during deployment.
- UI components and the `EnvironmentVariableProtection` trait have been updated
to make these generated variables read-only, preventing accidental modification.

This commit introduces two new helper functions to standardize resource naming
for pull request deployments:

-  `addPreviewDeploymentSuffix()`: Generates a consistent suffix format (-pr-{id})
   for resource names in preview deployments
-  `generateDockerComposeServiceName()`: Creates SERVICE_NAME environment variables
   for Docker Compose services
2025-09-08 15:22:44 +02:00
Andras Bacsai
18068857b1 refactor(file-transfer): replace base64 encoding with direct file transfer method across multiple database actions for improved clarity and efficiency 2025-09-08 14:04:24 +02:00
Andras Bacsai
852b2688d9 refactor(error-handling): remove ray debugging statements from CheckUpdates and shared helper functions to clean up error reporting 2025-09-08 14:03:27 +02:00
Andras Bacsai
4bd29bf966 refactor(ssh): enhance error handling in SSH command execution and improve connection validation logging 2025-09-07 18:45:44 +02:00
Andras Bacsai
579cc25898 fix(ssh): introduce SshRetryHandler and SshRetryable trait for enhanced SSH command retry logic with exponential backoff and error handling 2025-09-07 17:17:35 +02:00
Andras Bacsai
75b61a6b00 feat(domains): add force_domain_override option and enhance domain conflict detection responses 2025-08-28 11:21:30 +02:00
Andras Bacsai
80499a03d8 feat(domains): implement domain conflict detection and user confirmation modal across application components 2025-08-28 10:52:41 +02:00
Andras Bacsai
e0aa28ba31 refactor(domains): rename check_domain_usage to checkDomainUsage and update references across the application 2025-08-28 10:00:19 +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
efc1264810 fix(parsers): do not modify service names, only for getting fqdns and related envs 2025-08-27 21:22:04 +02:00
Andras Bacsai
3e816c8281 refactor(parsers): remove unnecessary hyphen-to-underscore replacement for service names in serviceParser function 2025-08-27 18:36: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
cde528bf5e fix(parsers): enhance volume string handling by preserving mode in application and service parsers. Update related unit tests for validation. 2025-08-27 16:54:49 +02:00
Andras Bacsai
5fbad08e45 fix(parsers): implement parseDockerVolumeString function to handle various Docker volume formats and modes, including environment variables and Windows paths. Add unit tests for comprehensive coverage. 2025-08-27 16:39:38 +02:00
Andras Bacsai
4a1eb064a4 fix(parsers): replace hyphens with underscores in service names for consistency. this allows to properly parse custom domains in docker compose based applications 2025-08-27 16:22:37 +02:00
Andras Bacsai
74ebaef17b feat(api): enhance IP access control in middleware and settings; support CIDR notation and special case for 0.0.0.0 to allow all IPs 2025-08-26 10:27:38 +02:00
Aditya Tripathi
8a35295f13
fix(proxy): filter host network from default proxy (#6383) 2025-08-18 17:48:24 +02:00
Andras Bacsai
ee502b9f76 feat(email): implement email change request and verification process
- Added functionality for users to request an email change, including generating a verification code and setting an expiration time.
- Implemented methods in the User model to handle email change requests, code validation, and confirmation.
- Created a new job to update the user's email in Stripe after confirmation.
- Introduced rate limiting for email change requests and verification attempts to prevent abuse.
- Added a new notification for email change verification.
- Updated the profile component to manage email change requests and verification UI.
2025-08-18 14:54:08 +02:00
Andras Bacsai
460198bb05 fix(application): clear Docker Compose specific data when switching away from dockercompose 2025-08-18 11:31:14 +02:00
Andras Bacsai
be34c0c2b4 refactor(parsers): update volume parsing logic to use beforeLast and afterLast for improved accuracy 2025-08-17 18:36:28 +02:00
Andras Bacsai
1675c85d4d refactor(shared helpers): remove unused parseServiceVolumes function to clean up codebase 2025-08-17 18:09:59 +02:00
Andras Bacsai
9b98891269
Merge branch 'next' into fix-volume-variable-with-default 2025-08-17 18:03:38 +02:00
Andras Bacsai
42bdc2a5fd refactor(docker compose): remove deprecated newParser function and associated test file to streamline codebase 2025-08-17 18:03:00 +02:00
Andras Bacsai
0dada987a2 feat(backup): add disable local backup option and related logic for S3 uploads 2025-08-17 12:34:20 +02:00
Andras Bacsai
970fd3d9e6 refactor(parsers): streamline domain handling in applicationParser and improve DNS validation logic 2025-08-12 10:07:11 +02:00
Andras Bacsai
39f25573bf refactor(templates): update service template file handling to use dynamic file name from constants 2025-08-12 10:06:19 +02:00
Andras Bacsai
936a192236 fix(parsers): clarify comments and update variable checks for FQDN and URL handling 2025-08-12 10:06:19 +02:00
Andras Bacsai
e8892b3d29 feat(core): finally fqdn is fqdn and url is url. haha 2025-08-12 10:06:19 +02:00
Andras Bacsai
a0bc4dac55 fix(application): streamline environment variable updates for Docker Compose services and enhance FQDN generation logic 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
Trung-DV
4f77bd4347 Fix volume target, use the last part
Signed-off-by: Trung-DV <TrungDV.PMB@gmail.com>
2025-08-06 10:21:54 +07:00
jvdboog
7a110880c1 feat: Improve detection of special network modes 2025-07-20 22:15:42 +02:00
Andras Bacsai
9651e3a7ec revert(parser): enhance FQDN generation logic for services and applications 2025-07-18 23:10:08 +02:00
Andras Bacsai
90ccaeba51 feat(application): implement environment variable updates for Docker Compose applications, including creation, updating, and deletion of SERVICE_FQDN and SERVICE_URL variables 2025-07-18 20:48:56 +02:00
Andras Bacsai
5e693eb4b5 refactor(services): simplify environment variable updates by using updateOrCreate and add cleanup for removed FQDNs 2025-07-18 20:48:56 +02:00
Andras Bacsai
9ed77e5eef fix(services): update environment variable naming convention to use underscores instead of dashes for SERVICE_FQDN and SERVICE_URL 2025-07-18 20:48:56 +02:00
Andras Bacsai
94f9c54256 fix(deployment): refactor domain parsing and environment variable generation using Spatie URL library 2025-07-08 10:42:34 +02:00
Andras Bacsai
95da765a9e fix(deployment): improve docker-compose domain handling and environment variable generation 2025-07-07 16:07:08 +02:00
Andras Bacsai
085529dc63 fix(deployment): enhance COOLIFY_URL and COOLIFY_FQDN variable generation for better compatibility 2025-07-07 12:55:35 +02:00
Andras Bacsai
6a90bdf9fa fix(env): Generate literal env variables better 2025-07-07 12:30:44 +02:00
Andras Bacsai
f732220b8f refactor(shared): improve error handling in getTopLevelNetworks function to return network name on invalid docker-compose.yml 2025-07-07 10:20:54 +02:00
Andras Bacsai
2f68f965a7 refactor(shared): enhance FQDN generation logic for services in newParser function 2025-07-03 21:29:57 +02:00
Andras Bacsai
485e45bbb8 fix(shared): refactor gzip handling for Pocketbase in newParser function for improved clarity 2025-06-26 21:59:53 +02:00
Andras Bacsai
34135f2b4a fix(parser): enable gzip compression conditionally for Pocketbase images and streamline service creation logic 2025-06-25 13:12:11 +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
e42c5baedd fix(parser): improve FQDN generation and update environment variable handling 2025-06-24 13:28:52 +02:00
Hauke Schnau
1968d4d494
feat(auth): add Zitadel OAuth Provider (#5490) 2025-06-18 14:35:54 +02:00
Yassir Elmarissi
a77bd88258
feat(auth): Add Clerk OAuth Provider (#5553) 2025-06-18 14:29:46 +02:00
Yassir Elmarissi
4375f52c5d
feat(auth): Add Discord OAuth Provider (#5552) 2025-06-18 14:19:01 +02:00
Andras Bacsai
81d6cb539b refactor(remoteProcess): update sanitize_utf8_text function to accept nullable string parameter for improved type safety 2025-06-10 10:53:23 +02:00
Andras Bacsai
ddcb14500d refactor(proxy-status): refactored how the proxy status is handled on the UI and on the backend
feat(cloudflare): improved cloudflare tunnel automated installation
2025-06-06 14:47:54 +02:00
Andras Bacsai
8e8400f595 feat(utf8-handling): implement UTF-8 sanitization for command outputs and enhance error handling in logs processing 2025-06-05 14:27:39 +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
2361c34a53 refactor(error-handling): replace generic Exception with RuntimeException for improved error specificity 2025-05-29 10:49:55 +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
2189c44ba5 fix(shared): remove unused relation from queryDatabaseByUuidWithinTeam function 2025-05-20 15:08:20 +02:00
Arnaud Dezandee
587a927b8b
feat(oauth): set redirect uri as optional and add default value (#5760) 2025-05-20 14:35:39 +02:00
Andras Bacsai
24b7b53973 Revert "fix(dev): mount points?!"
This reverts commit 365bf3cbf0.
2025-05-05 08:55:44 +02:00
Andras Bacsai
cf7a6eccab fix(dev): proxy mount point 2025-05-03 12:44:32 +02:00
Andras Bacsai
365bf3cbf0 fix(dev): mount points?! 2025-05-03 09:59:42 +02:00
Andras Bacsai
22b88d55b3 fix(applications): include pull_request_id in deployment queue check to prevent duplicate deployments 2025-04-30 15:28:47 +02:00
Andras Bacsai
d8c3418e72 feat(Service): Add functionality to convert between applications and databases in docker-compose based applications
fix(ui): Fix service layout refresh on compose change
2025-04-29 14:27:17 +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
02b6aaaaf0 refactor(shared): remove unused ray debugging statement from newParser function 2025-04-21 09:58:56 +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
Andras Bacsai
618e546966 feat(core): Enable magic env variables for compose based applications 2025-04-16 15:26:40 +02:00
Andras Bacsai
3894023a2e fix(parser): transform associative array labels into key=value format for better compatibility 2025-04-15 18:41:21 +02:00
Andras Bacsai
f453b610bb
Merge pull request #5579 from YaRissi/fix/compose-service-duplicate
fix(service): Dont duplicate the service entry if image changed
2025-04-14 12:02:34 +02:00
Andras Bacsai
4c95dccfb3 refactor(SourceManagement): sort sources by name and improve UI for changing Git source with better error handling 2025-04-11 20:25:25 +02:00
Andras Bacsai
d075241289 feat(Deployment): enhance queue_application_deployment to handle existing deployments and return appropriate status messages 2025-04-11 15:27:56 +02:00
elmariss
11c1babc85 fix check if image changed 2025-04-10 01:06:01 +02:00
sebi
4f5df53f1f add hostname 2025-04-04 18:39:52 +01:00
Andras Bacsai
b366b45914
Merge branch 'next' into fix_service_app_log_drain 2025-03-31 17:45:06 +02:00
Andras Bacsai
fcfd00eebe feat(application): add SPA configuration and update Nginx generation logic 2025-03-31 15:10:50 +02:00
Leonid Zharikov
c4ef08d419 fix(parser): Add logging support for applications in services 2025-03-29 23:52:12 +00:00
Andras Bacsai
b376d6df2a reverting: encrypting mount and fs_path 2025-03-29 22:16:12 +01:00
Andras Bacsai
c2941abe57 fix(file-storage): double save on compose volumes 2025-03-28 22:10:33 +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
f060b7d3d2 refactor(shared): enhance job status check to include 'reserved' 2025-03-28 15:42:25 +01:00
Andras Bacsai
735fcaad33 refactor(shared): add logging for running deployment jobs 2025-03-28 15:30:21 +01:00
Andras Bacsai
2a08f4d653 refactor(shared): simplify deployment status check logic 2025-03-28 15:09:38 +01:00
Andras Bacsai
e891318396 refactor(configuration): centralize configuration management in ConfigurationRepository 2025-03-24 21:01:27 +01:00
Andras Bacsai
5e6c112fcc feat(github): enhance repository loading and validation in applications 2025-03-24 14:29:17 +01:00
Andras Bacsai
806d892031 refactor(application): streamline healthcheck parsing from Dockerfile 2025-03-24 11:43:10 +01:00
Andras Bacsai
009cee1bbd
Merge branch 'next' into feat-db-ssl 2025-03-17 15:15:24 +01:00
peaklabs-dev
ee93ccd8e7
fix(backups): retention settings
- If you set a low local backup retention, for example 2 backups for local backup retention and 10 backups for S3, then the S3 backups were never deleted, not even after 10 days. This was because we check the file paths based on the backup executions table, and as soon as a backup was deleted locally, the execution was removed, which meant after 10 days for s3 there where no backups older then 10 days just the 2 local backups which is just wrong. Now we only delete a backup execution if it has been removed from both locations.
- Also added a nice little UI element to see where your backup is available.
2025-03-14 15:28:12 +01:00
Andras Bacsai
2c845461c9 refactor(nginx): streamline default Nginx configuration and improve error handling
Updated the default Nginx configuration function to enhance clarity and maintainability. Removed unnecessary redirection logic and added explicit handling for 404 errors, ensuring a more robust error management strategy. This refactor simplifies the configuration while maintaining essential functionality, contributing to a cleaner and more efficient setup.
2025-03-13 20:30:22 +01:00
Andras Bacsai
e7e0cb6666
Merge pull request #5162 from notm1ke/main
feat(oauth): Add support for configuring and passing hd parameter to Google
2025-03-10 19:25:18 +01:00
Andras Bacsai
f1b98f5ce9 fix(helpers): Initialize command variable in parseCommandFromMagicEnvVariable 2025-02-28 20:28:35 +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
dea125f679 refactor(notifications): Improve transactional email settings handling
- Replace `! $type` checks with `blank($type)` for consistency
- Modify email settings configuration to handle null/disabled states
- Ensure proper fallback and configuration of email providers
2025-02-27 12:56:37 +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
🏔️ Peak
9557957f18
Merge branch 'next' into feat-db-ssl 2025-02-19 17:57:59 +01:00
Mike M
4a0cab8be3 Added support for passing hd parameter to Google via existing tenant column in oauth_settings 2025-02-16 16:44:22 -08:00
Andras Bacsai
b53e289bcd fix(core): improve connection testing with dynamic disk configuration for s3 backups 2025-02-13 10:07:58 +01:00
🏔️ Peak
c7840bdf1b
Merge branch 'next' into feat-db-ssl 2025-02-07 23:01:46 +01:00
Andras Bacsai
186a3fc75b
Merge pull request #5038 from Vann-Dev/main
feat(api): add applications logs api
2025-02-04 13:33:30 +01:00
Andras Bacsai
8033a89dee fix(ui): simplify service templates loading logic 2025-02-04 13:30:27 +01:00
🏔️ Peak
f871c1067b
Merge branch 'next' into feat-db-ssl 2025-02-03 22:20:51 +01:00
peaklabs-dev
3cf758e2d0
fix(databases): fix database name users new uuid instead of DB one 2025-02-03 21:43:16 +01:00
Andras Bacsai
773caf7fd5 feat(core): add name to default proxy configuration 2025-02-03 21:24:01 +01:00
Andras Bacsai
8be536d3ec fix(core): increase HTTP/2 max concurrent streams to 250 (default) 2025-02-02 14:03:18 +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
55fb4e5d20
Merge pull request #4945 from nktnet1/feat-env-coolify-resource-uuid
feat(env): added COOLIFY_RESOURCE_UUID environment variable
2025-01-28 13:46:17 +01:00
Andras Bacsai
d8877884d7
Merge pull request #4933 from nktnet1/fix-coolify-env-quotes
fix: remove quotes in COOLIFY_CONTAINER_NAME
2025-01-28 11:24:19 +01:00
Andras Bacsai
cd0320f392
Merge pull request #4938 from hederson/fix-swarm-proxy
Fix swarm proxy and detach param
2025-01-28 11:11:56 +01:00
peaklabs-dev
12c7ee2879
fix(s3): DigitalOcean storage buckets do not work 2025-01-25 23:40:40 +01:00
Khiet Tam Nguyen
a55d1996d7
feat(env): added COOLIFY_RESOURCE_UUID environment variable 2025-01-24 22:04:34 +11:00
peaklabs-dev
8b6b1b6a9d
fix(storage): Hetzner storage buckets not working
- fix: Hetzner buckets do not work for backups
- refactor: removed special handling for Hetzner as it is no longer needed
2025-01-23 18:51:24 +01:00
Hederson Boechat
071cabdc31 fix(proxy) update traefik proxy config for docker swarm 2025-01-23 11:57:34 -03:00
Khiet Tam Nguyen
c4bf91e5b4
fix: remove quotes in COOLIFY_CONTAINER_NAME 2025-01-23 13:08:31 +11:00
Andras Bacsai
c9869e13e0 refactor(workflows): replace jq with PHP script for version retrieval in workflows 2025-01-22 14:05:29 +01:00
Andras Bacsai
6a03bb369e chore(versions): update coolify versions to v4.0.0-beta.389 and add helper version retrieval script 2025-01-22 14:01:05 +01:00
Andras Bacsai
085103708c fix(core): v1 parser versions trying to access application_id, while it is resourceable_id
fix(db): remove wrongly created, empty environmentvariables
2025-01-22 10:21:51 +01:00
Andras Bacsai
8c937156c5 fix(core): compose parsing for apps 2025-01-21 20:00:05 +01:00
Andras Bacsai
8350c3e039 fix: correct service update logic in Docker Compose parser 2025-01-20 13:59:02 +01:00
Andras Bacsai
618b89f648
Merge pull request #4842 from peaklabs-dev/docker-cleanup-executions-ui
feat: Docker cleanup execution UI and some UI improvements
2025-01-16 21:42:02 +01:00
Andras Bacsai
3c83c7fd6c
Merge pull request #4754 from coollabsio/improve-git-and-service-provider
Improves: GitHub handling, AppServiceProvider and 500 error message rendering
2025-01-16 21:09:08 +01:00
🏔️ Peak
11d1a9e6fd
Merge branch 'next' into docker-cleanup-executions-ui 2025-01-16 14:41:23 +01:00
peaklabs-dev
3aca101821
fix: Redis DB should use the new resourceable columns 2025-01-16 12:51:18 +01:00
peaklabs-dev
85f38b7cb5
refactor: improve data formatting and UI
- move date and duration functions to a shared function
- remove duplicate code
- redesigned the deployment executions tab
- added start and end times for backups, scheduled tasks, deployments and docker cleanup executions
- calculated the duration for backups, scheduled tasks, deployments and Docker cleanup executions
- redesigned status badges with colors to make it easier to see your current status
- removed dependency on dayjs
- fixed calculation of execution time was sometimes incorrect
2025-01-15 18:35:20 +01:00
peaklabs-dev
e9f691bf45
fix: storage retention setting
- feat: add storage retention to local storage as well
- fix: UI input for max storage now allows exact decimals so MB input is now also possible
- fix: Database column is now decimal instead of integer
- fix: variable naming of storage check no longer overwrites $backup - renamed it to $backupExecution
2025-01-13 19:49:12 +01:00
peaklabs-dev
3347eb3a1a
fix: retention functions and folder deletion for local backups
- fix: Delete folder and parent folder if folders are empty when deleting local backups.
- fix: Do not remove executions from DB until both S3 and local backups have been deleted and successfully processed otherwise backups will never be deleted from s3.
- fix: Server ID could be null
2025-01-13 18:46:27 +01:00
peaklabs-dev
a5fadb0536
fix: function calls 2025-01-13 16:54:17 +01:00
peaklabs-dev
f0d15afbf2
chore: improve code 2025-01-13 16:43:23 +01:00
peaklabs-dev
fb01aed6d5
feat: new global s3 and local backup deletion function 2025-01-13 16:37:36 +01:00
Andras Bacsai
a396d51452
Merge branch 'next' into hotfix 2025-01-10 20:23:29 +01:00
Andras Bacsai
3a3219394d refactor: enhance ApplicationDeploymentJob and HorizonServiceProvider for improved job handling
- Removed the private property for application deployment queue ID in ApplicationDeploymentJob and utilized constructor property promotion.
- Added a tags method in ApplicationDeploymentJob to properly identify the worker running the job.
- Updated HorizonServiceProvider to handle cases where the deployment queue ID is blank, preventing potential errors during job processing.
- Cleaned up the isAnyDeploymentInprogress function by removing unnecessary whitespace.
2025-01-10 20:07:01 +01:00
Andras Bacsai
7582d7dd8b refactor: streamline job status retrieval and clean up repository interface
- Simplified the job status retrieval process by consolidating logic into a single `getJobStatus` function.
- Removed redundant checks and methods from the `CustomJobRepositoryInterface` and `CustomJobRepository`.
- Updated the `getHorizonJobStatus` method in `ApplicationDeploymentQueue` to directly utilize the new `getJobStatus` function.
- Enhanced the `isThereAJobInProgress` method to improve clarity and maintainability.
2025-01-10 19:53:13 +01:00
Andras Bacsai
db079c0c7d refactor: improve deployment status check in isAnyDeploymentInprogress function
- Updated the isAnyDeploymentInprogress function to check for running jobs based on the current hostname.
- Enhanced the logic to return true if any job status is 'unknown' and to provide a clearer output regarding the number of deployments in progress.
- Modified the cloud_upgrade.sh script to loop until the deployment status check confirms no ongoing deployments before proceeding with the upgrade.
2025-01-10 18:34:16 +01:00
Andras Bacsai
02400added fix: horizon job checker 2025-01-10 18:27:48 +01:00
Andras Bacsai
b7d18fc28c fix: getcontainer status should timeout after 30s 2025-01-10 12:04:59 +01:00
peaklabs-dev
c789ed6003
chore: remove more logging 2025-01-06 21:16:57 +01:00
peaklabs-dev
09dfbde676
chore: remove debug log, finally found it 2025-01-06 21:14:06 +01:00
peaklabs-dev
deec885fd9
fix: Expiration time claim ('exp') must be a numeric value 2025-01-06 21:08:22 +01:00
peaklabs-dev
126e5ff57a
add debug log 2025-01-06 20:56:19 +01:00
peaklabs-dev
fdb5f069fc
chore: ajust time to 50s (tests done) 2025-01-06 18:32:05 +01:00
peaklabs-dev
a29547b3ba
fix: error rendering 2025-01-06 17:49:55 +01:00
peaklabs-dev
503d2b4866
fix: error message and server time getting 2025-01-06 17:43:27 +01:00
peaklabs-dev
05113d8e06
fix: check System and GitHub time and throw and error if it is over 50s out of sync 2025-01-06 17:28:49 +01:00
peaklabs-dev
4d34d689b0 refactor: github.php
- Rename functions
- Consolidate Code
- Fix: timing issues with JWT tokens
- Clearer error handling
2025-01-06 16:58:20 +01:00
Andras Bacsai
f575d1249e Merge branch 'main' into next 2024-12-27 11:09:29 +01:00
peaklabs-dev
1f6c6140ba
fix: smtp encryption 2024-12-23 15:28:35 +01: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
Andras Bacsai
9e3467578f feat: add environment_uuid support and update API documentation
- Introduced `environment_uuid` as a required field in various API endpoints and schemas.
- Updated descriptions to clarify that either `environment_name` or `environment_uuid` must be provided.
- Modified routes and controller methods to accommodate the new UUID parameter.
- Adjusted frontend components to utilize `environment_uuid` for better consistency and clarity.
- Removed deprecated fields related to environment handling.

This change enhances the API's flexibility in identifying environments, improving overall usability.
2024-12-17 13:42:16 +01:00
Andras Bacsai
2a9d499251 feat: migrate env variables to polymorphic relationship
fix: proxy status query ui
2024-12-17 10:38:42 +01:00