Commit graph

80 commits

Author SHA1 Message Date
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
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
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
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
d6d1c9ad82 feat(database): add CA certificate generation for database servers 2025-03-31 14:02:15 +02:00
peaklabs-dev
225f24e650
chore: improve code quality suggested by code rabbit 2025-02-19 18:04:58 +01:00
peaklabs-dev
a539bfd765
fix(ssl): server id 2025-02-07 18:45:12 +01:00
peaklabs-dev
6a52f51851
fix(ssl): get caCert correctly 2025-02-07 18:27:30 +01:00
peaklabs-dev
a3c4f86e80
fix(ssl): do not remove SSL directory 2025-02-05 18:03:55 +01:00
peaklabs-dev
80fc7c7b97
fix(ssl): use mountPath parameter not a hardcoded path 2025-02-04 18:31:09 +01:00
peaklabs-dev
3c62130e86
fix(ssl): improve SSL cert file mounts
- If SSL is disabled, delete the SSL crt and file mounts in the DB
- If SSL is disabled, delete the SSL folder
- If SSL is enabled, make sure the file mounts are added inside the helper
- remove old file mounts first to make sure the ssl crt content is always up to date and no duplicates are added
2025-02-04 16:34:24 +01:00
peaklabs-dev
5f357e3d92
fix(database): fix volume and file mounts and naming
- fix: Volume and file mounts are unmounted if there are more than 1
- rename the crt and key to server key and crt to follow best practices
- move crt and key to a more standardized location
2025-02-03 22:03:45 +01:00
peaklabs-dev
85c777d2a4
feat(ssl): use new improved helper for SSL generation
- use CA cert and key for SSL cert generation
- remove unused parameters
- add a few more echo with log output
2025-01-31 13:56:20 +01:00
peaklabs-dev
9f9349925a
fix(ssl): permission of ssl crt and key inside the container 2025-01-30 12:58:48 +01:00
peaklabs-dev
b124904245
feat(db): setup ssl during Postgres start
- create ssl directory
- create a new certificate if one does not already exist
- add the certificates to the file store so that they are created as file mounts
- add SSL startup commands
2025-01-29 13:30:45 +01:00
Andras Bacsai
1fe4dd722b Revert "rector: arrrrr"
This reverts commit 16c0cd10d8.
2025-01-07 15:31:43 +01:00
Andras Bacsai
16c0cd10d8 rector: arrrrr 2025-01-07 14:52:08 +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
33ae10a6dc fix 2024-12-18 10:44:56 +01:00
🏔️ Peak
12a48a1439
Merge branch 'next' into fix-postgres-init-scripts 2024-12-09 19:50:54 +01:00
🏔️ Peak
7328724f3d
Merge branch 'coollabsio:main' into fix-postgres-init-scripts 2024-12-04 13:15:58 +01:00
Andras Bacsai
ec9315f24e remove unnecessary things 2024-12-03 14:09:51 +01:00
Julien
8b30123add feat: add service/resource/project labels 2024-11-17 23:06:05 +01:00
Andras Bacsai
ff6f089483 feat: add --gpu support for custom docker command 2024-11-06 10:13:40 +01:00
Andras Bacsai
e4d20c1d02 add database labels 2024-11-02 14:04:59 +01:00
peaklabs-dev
18201ece00
fix remove postgres config if it is null or not set 2024-10-18 21:17:57 +02:00
peaklabs-dev
1ec3caf9e3
fix: if an init script is renamed the old version is still on the server 2024-10-18 21:07:23 +02:00
Andras Bacsai
b570ccd7d3 format 2024-09-23 19:51:31 +02:00
Vahor
f6d649307c
test add_coolif_default_environment_variables 2024-08-28 13:30:59 +02:00
Vahor
b51065a003
add generate_fluentd_configuration() method in shared 2024-08-28 13:00:33 +02:00
Vahor
c87732b065
revert format 2024-08-27 20:47:17 +02:00
Vahor
a245d16e05
add env vars for db services 😢 2024-08-27 18:57:02 +02:00
Vahor
eb22155dcc
send new vars to logdrain 2024-08-27 18:41:33 +02:00
Andras Bacsai
f106e6e37b feat: add custom docker container options to all databases 2024-08-16 13:56:47 +02:00
Andras Bacsai
2c92cc40e1 refactor: Update code to use str() instead of Str::of() for string manipulation 2024-06-25 10:37:10 +02:00
Thijmen
d86274cc37 Fix styling 2024-06-10 20:43:34 +00:00
Andras Bacsai
035e145cd1 feat: add more persistent storage types 2024-05-27 14:14:44 +02:00
Andras Bacsai
fb80318553 Refactor docker-compose files to remove version numbers 2024-05-08 09:23:36 +02:00
Andras Bacsai
2b422a542a fix: empty db conf
feat: add listen_addresses to postgresql if its missing in the custom conf
2024-05-07 12:35:24 +02:00
Andras Bacsai
35b07a9c18 Refactor code to add sudo prefix for certain commands in multiple files 2024-04-17 10:49:34 +02:00
Andras Bacsai
e71032a8fc Fix variable assignment in Import.php and ApplicationDeploymentJob.php 2024-04-11 13:20:46 +02:00
Andras Bacsai
c20aa0b256 Refactor method names to use camel case 2024-03-04 11:01:14 +01:00
Andras Bacsai
8385bbb0a0 feat: gzip enabled & stipprefix setting
refactor: code
2024-03-04 10:46:13 +01:00
Andras Bacsai
45e404b15b feat: disable gzip compression on service applications 2024-02-15 20:44:01 +01:00