Commit graph

179 commits

Author SHA1 Message Date
Andras Bacsai
27e2680d70 Merge remote-tracking branch 'origin/next' into fix/configurable-proxy-timeout 2026-03-10 10:01:46 +01:00
Andras Bacsai
184fbb98f3 fix(proxy): add validation and normalization for database proxy timeout
- Extract proxy timeout configuration logic into dedicated method
- Add min:1 validation rule for publicPortTimeout
- Normalize invalid timeout values (null, 0, negative) to default 3600s
- Add tests for timeout configuration normalization and validation
2026-03-10 09:59:19 +01:00
Brendan G. Lim
040658c142 fix: address review feedback on proxy timeout
- Fix disable logic: timeout editable when proxy is stopped
- Remove hardcoded proxy_connect_timeout (60s is nginx default)
- Remove misleading '0 for no timeout' helper text
- Add min:1 validation for timeout value
2026-02-27 14:24:04 -08:00
Cinzya
34c5eb9e10 fix(proxy): mounting error for nginx.conf in dev 2026-02-27 22:07:37 +01:00
Brendan G. Lim
30c1d9bbd0 feat: add configurable timeout for public database TCP proxy
Adds a per-database 'Proxy Timeout' setting for publicly exposed databases.
The nginx stream proxy_timeout can now be configured in the UI, defaulting
to 3600s (1 hour) instead of nginx's 10min default. Set to 0 for no timeout.

Fixes #7743
2026-02-26 21:12:58 -08:00
Andras Bacsai
76a6960f44 chore: prepare for PR 2026-02-23 13:26:01 +01:00
Andras Bacsai
b7480fbe38 chore: prepare for PR 2026-02-15 13:46:08 +01:00
Andras Bacsai
fc229c4889 chore: prepare for PR 2026-02-03 15:32:03 +01:00
Andras Bacsai
29c62cb38f fix(service): use database UUID for ServiceDatabase proxy container name
The proxy container was incorrectly named using the service UUID instead
of the database UUID, causing proxy logs to query the wrong container.
Each ServiceDatabase should have its own uniquely named proxy container.
2026-01-02 16:49:24 +01:00
Andras Bacsai
75d8ebe803 fix(restart): reset restart count when resource is manually stopped
When a database or application was in a restart loop, the restart count
persisted even after the user manually stopped the resource. This caused
the UI to continue showing "(Xx restarts)" after user intervention.

Now resets restart_count, last_restart_at, and last_restart_type when:
- User stops a database (StopDatabase action)
- User stops an application (StopApplication action)

The existing reset in GetContainersStatus is still needed for containers
that exit on their own (crash without recovery, Docker giving up).

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-27 15:21:19 +01:00
Andras Bacsai
9a1020d5be fix(database): replace temporary file handling with base64 encoding for Keydb and Redis configuration 2025-12-25 18:17:42 +01:00
Andras Bacsai
d4a403278d
Added ClickHouse Migration Support (#7392) 2025-12-17 11:37:53 +01:00
Andras Bacsai
f42d076f31
Merge branch 'next' into fix-docker-time-database-v2 2025-11-28 13:12:00 +01:00
EbinJose2002
f37eef8266 - Made necessary changes to the migration and created new one as well.
- Updated the Clickhouse service template to use the official `clickhouse/clickhouse-server` image.
- Removed the usage of the deprecated `bitnamilegacy/clickhouse` image.

- fixes #7110
2025-11-28 17:12:11 +05:30
Andras Bacsai
c136724838 fix(docker): migrate database start actions from --time to -t flag
Migrates 8 database start action files from deprecated --time=10 to compatible -t 10 flag for Docker v28+ compatibility. Also updates test expectations in StopProxyTest.php.

Docker deprecated the --time flag in v28.0. The -t shorthand works on all Docker versions (pre-28 and 28+), ensuring backward and forward compatibility.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 11:18:12 +01:00
Andras Bacsai
9503da60b4
Revert "fix(docker): migrate database start actions from --time to -t flag" 2025-11-28 11:15:55 +01:00
Andras Bacsai
5b7a6d9a76 fix(docker): migrate database start actions from --time to -t flag
Migrates 8 database start action files from deprecated --time=10 to compatible -t 10 flag for Docker v28+ compatibility. Also updates test expectations in StopProxyTest.php.

Docker deprecated the --time flag in v28.0. The -t shorthand works on all Docker versions (pre-28 and 28+), ensuring backward and forward compatibility.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 11:08:20 +01:00
Andras Bacsai
1d054b23b8
Merge branch 'next' into shadow/fix-docker-time-command 2025-11-28 10:25:42 +01:00
Andras Bacsai
2f3052a283 Fix database restart to skip unnecessary Docker cleanup
Prevents removal and re-download of database images on every restart. Docker cleanup was removing Docker Hub images (postgres, mysql, redis, etc.) that lack the coolify.managed=true label, causing them to be immediately re-pulled. Restart now preserves images while stopping/starting containers.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 17:15:45 +01:00
ShadowArcanist
501a67ac40
Merge branch 'next' into shadow/fix-docker-time-command 2025-11-06 20:17:10 +05:30
Andras Bacsai
2db122c851 fix: remove debugging output from StartPostgresql command handling 2025-11-05 09:10:15 +01:00
Andras Bacsai
5b79844a3a fix: update docker stop command to use --time instead of --timeout 2025-11-05 08:48:10 +01:00
ShadowArcanist
9620455be0
Merge branch 'next' into shadow/fix-docker-time-command 2025-10-17 18:52:40 +05:30
Andras Bacsai
8d280b4aac fix: prevent container name conflict when updating database port mappings
When port mappings are changed in the UI and the database is restarted,
the system now gracefully stops and removes the existing container before
recreating it with the new configuration.

This prevents the "container name already in use" error that occurred when
Docker Compose tried to create a container with the same name but different
port configuration.

Changes:
- Add graceful container stop (10s timeout) before docker compose up
- Remove old container to avoid name conflicts
- Use --timeout flag (modern Docker CLI) instead of deprecated --time
- Apply fix to all database types: MariaDB, MySQL, PostgreSQL, MongoDB,
  Redis, KeyDB, Dragonfly, and ClickHouse
- Update StopDatabase.php for consistency

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-13 10:01:54 +02:00
Andras Bacsai
f4e5c195fe refactor: replace direct SslCertificate queries with server relationship methods for consistency 2025-10-09 17:00:05 +02:00
ShadowArcanist
b39690dfa2 Changed docker --time command to -t since --time is deprecated on v28 2025-10-09 13:26:10 +05:30
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
1c08d32b85 refactor(database): remove volume_configuration_dir and streamline configuration directory usage in MongoDB and PostgreSQL handlers 2025-09-10 16:12:53 +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
🏔️ Peak
c404581b25
fix(database): custom postgres configs with SSL (#6352) 2025-08-11 18:22:03 +02:00
peaklabs-dev
c551be9be8
chore(core): remove unused argument 2025-08-04 22:11:29 +02:00
🏔️ Peak
2a526c54d5
fix(docker): volumes get delete when stopping a service if Delete Unused Volumes is activated (#6317) 2025-08-04 21:15:56 +02:00
Andras Bacsai
eb322ce397 fix(database): ensure internal port defaults correctly for unsupported database types in StartDatabaseProxy 2025-07-08 21:03:20 +02:00
Andras Bacsai
9b8da285c0 refactor(database): improve error handling for unsupported database types in StartDatabaseProxy 2025-07-07 10:23:31 +02:00
Andras Bacsai
620f70c7ff fix(database): proxy ssl port if ssl is enabled 2025-06-30 09:26:28 +02:00
Darren Sisson
b70a9a6d47
change db proxy to use volume mount for config (#5981)
* change db proxy to use volume mount for config

* fix(database-proxy): adjust configuration directory for development environment

---------

Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com>
2025-06-13 18:02:52 +02:00
Andras Bacsai
ede912b1d3 refactor(database-management): simplify docker cleanup logic in StopDatabase to enhance readability 2025-05-30 14:04:15 +02:00
Andras Bacsai
786bfa960f improvement(core): simplify events for app/db/service status changes 2025-05-19 21:50:32 +02:00
Andras Bacsai
24b7b53973 Revert "fix(dev): mount points?!"
This reverts commit 365bf3cbf0.
2025-05-05 08:55:44 +02:00
Andras Bacsai
365bf3cbf0 fix(dev): mount points?! 2025-05-03 09:59:42 +02:00
Andras Bacsai
d10c3e86b1 fix(database): reduce container stop timeout from 300 to 30 seconds for improved responsiveness 2025-04-30 17:39:33 +02:00
Andras Bacsai
e516aeb534 refactor(Database): streamline container shutdown process and reduce timeout duration 2025-04-30 09:59:03 +02:00
Ashwin van Dijk
de2bd160ff
fix(mongodb): Also apply custom config when SSL is enabled 2025-04-14 09:55:28 +02:00
dekkku
b837af4a28
fix(database): custom config for MongoDB (#5471) 2025-04-02 20:39:11 +02:00
Andras Bacsai
d6d1c9ad82 feat(database): add CA certificate generation for database servers 2025-03-31 14:02:15 +02:00
Andras Bacsai
ebd9485acb refactor(database): change MySQL daemon command to MariaDB daemon 2025-03-27 10:14:40 +01:00
Darren Sisson
8aef5df539 change cleanup logic when restarting containers 2025-03-17 17:52:34 +00:00
Andras Bacsai
009cee1bbd
Merge branch 'next' into feat-db-ssl 2025-03-17 15:15:24 +01:00
Andras Bacsai
a07b581478 fix(database): simplify container name generation in StartDatabaseProxy 2025-03-12 16:46:31 +01:00
Andras Bacsai
078ef62eb8 fix(database): handle unsupported database types in StartDatabaseProxy
Added a default case to the switch statement in StartDatabaseProxy to throw an exception for unsupported database types. This change improves error handling and ensures that only valid database types are processed, enhancing the robustness of the database proxy functionality.
2025-03-12 16:35:47 +01:00