coolify/app/Actions/Database
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
..
RestartDatabase.php feat: restart database 2024-07-02 13:39:44 +02:00
StartClickhouse.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StartDatabase.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
StartDatabaseProxy.php Revert "refactor(file-transfer): replace base64 encoding with direct file transfer method across multiple database actions for improved clarity and efficiency" 2025-09-15 17:55:08 +02:00
StartDragonfly.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StartKeydb.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StartMariadb.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StartMongodb.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StartMysql.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StartPostgresql.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StartRedis.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StopDatabase.php fix: prevent container name conflict when updating database port mappings 2025-10-13 10:01:54 +02:00
StopDatabaseProxy.php fix(core): stopping database is not disabling db proxy 2025-02-03 21:23:43 +01:00