module

Yozgat::Deploy::ComposeDiff

Produces real unified diffs against the CURRENT deployment's compose file so the developer sees exactly what to change instead of a vague message.

Class methods

current_compose(project_id : Int64, env_id : Int64) : String | Nil

The compose file of the current (live) deployment, if any.

Source
diff(current : String, proposed : String) : String

Unified diff between two compose file contents (via git diff --no-index).

Source
inject_port(content : String, old_host : String, new_host : String) : String

Proposed compose file with the first host:container port mapping switched to the new host port (keeps the container port).

Source
inject_traefik(content : String, router_name : String, domain_names : Array(String), service_port : Int64) : String

Proposed compose file with Traefik labels + traefik_net attached to the first service, plus a top-level traefik_net declaration when missing.

Source