mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 12:17:13 +00:00
- Rename all docker-compose.yml templates to compose.yml - Update override and CA override filenames accordingly - Adjust compose wrapper, lookup plugins, filters and path helpers - Update roles, tasks, handlers and scripts to use compose CLI - Rewrite documentation and admin guides to reference compose - Update unit and integration tests to expect compose.yml - Keep internal variable keys for backward compatibility where needed https://chatgpt.com/share/69870272-b168-800f-84c3-6417398e441f
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
# module_utils/docker_paths_utils.py
|
|
from __future__ import annotations
|
|
|
|
from module_utils.entity_name_utils import get_entity_name
|
|
|
|
|
|
def get_docker_paths(application_id: str, path_docker_compose_instances: str) -> dict:
|
|
"""
|
|
Build the docker_compose dict based on path_docker_compose_instances and application_id.
|
|
Uses get_entity_name to extract the entity name from application_id.
|
|
"""
|
|
entity = get_entity_name(application_id)
|
|
base = f"{path_docker_compose_instances}{entity}/"
|
|
|
|
return {
|
|
"directories": {
|
|
"instance": base,
|
|
"env": f"{base}.env/",
|
|
"services": f"{base}services/",
|
|
"volumes": f"{base}volumes/",
|
|
"config": f"{base}config/",
|
|
},
|
|
"files": {
|
|
"env": f"{base}.env/env",
|
|
"docker_compose": f"{base}compose.yml",
|
|
"docker_compose_override": f"{base}compose.override.yml",
|
|
"docker_compose_ca_override": f"{base}compose.ca.override.yml",
|
|
"dockerfile": f"{base}Dockerfile",
|
|
},
|
|
}
|