Ensure that the database host alias is only attached to the database
containers themselves, not to dependent application containers. This
avoids DNS collisions where multiple containers expose the same alias
(e.g. 'postgres') on the same network, which led to connection refused
errors in XWiki.
See conversation: https://chatgpt.com/share/68cae4e5-94e4-800f-b291-d2acdb36af21
Added explicit aliases in the networks configuration for database containers
(Postgres/MariaDB). This guarantees that the configured 'database_host' is always
resolvable across external networks, fixing intermittent 'UnknownHostException'
issues when restarting dependent services (e.g., Confluence).
Ref: https://chatgpt.com/share/68cabfac-8618-800f-bcf4-609fdff432ed