mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-17 22:14:25 +02:00
Database Docker Composition
This role combines the central RDBMS role (cmp-rdbms
) with Docker Compose to deliver a ready-to-use containerized database environment.
Features
-
Central RDBMS Integration
Includes thecmp-rdbms
role, which handles backups, restores, user and permission management for your relational database system (PostgreSQL, MariaDB, etc.). -
Docker Compose
Utilizes the standalonedocker-compose
role to define and bring up containers, networks, and volumes automatically. -
Variable Load Order
- Docker Compose variables (
roles/docker-compose/vars/docker-compose.yml
) - Database variables (
roles/cmp-rdbms/vars/database.yml
)
Ensures compose ports and volumes are defined before the database role consumes them.
- Docker Compose variables (
The role will load both sub-roles and satisfy all dependencies transparently.
Task Breakdown
- Set Fact
database_application_id
to work around lazy‐loading ordering. - Include Vars in the specified order.
- Invoke
docker-compose
role to create containers, networks, and volumes. - Invoke
cmp-rdbms
role to provision the database, backups, and users.