pub struct ComposeEmitter;Expand description
Emits a single docker-compose.yml from the export model.
Each enabled service in the crate::ExportModel becomes one entry in the
Compose services: block. Ports default to 127.0.0.1 as the host bind
address. Named volumes are collected into the top-level volumes: block.
Dependencies with a healthcheck use the service_healthy condition;
dependencies without one use service_started.
§Example
use lightshuttle_export::{lower, ComposeEmitter, Emitter};
use lightshuttle_manifest::Manifest;
let manifest: Manifest = todo!("parse from YAML");
let model = lower(&manifest)?;
let artifacts = ComposeEmitter.emit(&model)?;
// artifacts.files[0].path == "docker-compose.yml"Trait Implementations§
Auto Trait Implementations§
impl Freeze for ComposeEmitter
impl RefUnwindSafe for ComposeEmitter
impl Send for ComposeEmitter
impl Sync for ComposeEmitter
impl Unpin for ComposeEmitter
impl UnsafeUnpin for ComposeEmitter
impl UnwindSafe for ComposeEmitter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more