17 Commits

Author SHA1 Message Date
ce029881d0
cmp-rdbms: make vars resilient when database_type is empty
Fix a templating crash during docker-compose.yml rendering when a role sets database_type to an empty string or does not expose it (e.g., svc-prx-openresty). Previously _database_id resolved to 'svc-db-' and get_app_conf attempted to read 'docker.services..name', raising AppConfigKeyError: Application ID 'svc-db-' not found.

Changes:
- Introduce _dbtype = (database_type | d('') | trim) and build _database_id only if _dbtype is non-empty.
- Guard central DB lookups: use get_app_conf(..., strict=False, default='') and only when _dbtype is set.
- Default _database_consumer_entity_name to get_entity_name of database_application_id or fallback to application_id.
- Only resolve database_port when _dbtype is set; otherwise empty.
- Minor formatting fixes for env and URL strings.

Impact:
- Prevents failures in roles without a DB or with database_type=''.
- Keeps previous behavior intact for apps with a valid database_type (mariadb/postgres).
- Eliminates 'config_path: docker.services..name' errors while keeping compose templates stable.

https://chatgpt.com/share/689b9d11-6308-800f-b20c-2d9f18d832f1
2025-08-12 21:59:37 +02:00
d5e5f57f92
Optimized openproject for new repository structure 2025-08-11 23:03:24 +02:00
90ad688ca9
Solved bbb backup bug 2025-08-07 14:57:02 +02:00
409e659143
Overall optimations for application id naming 2025-07-17 17:41:52 +02:00
562603a8cd
Restructured libraries 2025-07-17 16:38:20 +02:00
ad449c3b6a
Adapted roles to new architecture 2025-07-17 15:39:31 +02:00
725fea1169
Solved database credentials bug 2025-07-17 06:32:53 +02:00
bfc42ce2ac
Different little optimations 2025-07-17 04:23:05 +02:00
169493179e
Restructuring for new backup solution 2025-07-16 19:09:31 +02:00
076a2058cc
Solved variable naming bugs 2025-07-14 11:19:54 +02:00
c42d7cdf19
Updated database variables 2025-07-14 00:32:23 +02:00
56f6a2dc3b
Solved default variable bug 2025-07-14 00:04:13 +02:00
fb0ca533ae
Moved database port mapping to central port configuration file 2025-07-13 23:06:11 +02:00
ad60f5fb37
Rmeoved is_feature_enabled function 2025-07-13 17:54:09 +02:00
a98332bfb9
Semi bsr replace part two 2025-07-13 15:35:55 +02:00
3b03c5171d
Renamed the mariadb, openldap and postgres database 2025-07-12 16:06:13 +02:00
e14e6b96e9
Renamed Database roles 2025-07-12 10:11:52 +02:00