@@ -52,7 +52,35 @@ pub struct ComposeConfig {
52
52
pub struct ComposeService {
53
53
pub image : String ,
54
54
#[ serde( default , skip_serializing_if = "Option::is_none" ) ]
55
+ pub command : Option < Command > ,
56
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
55
57
pub volumes : Option < Vec < String > > ,
58
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
59
+ pub environment : Option < Vec < String > > ,
60
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
61
+ pub depends_on : Option < Vec < String > > ,
62
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
63
+ pub healthcheck : Option < HealthCheck > ,
64
+ }
65
+
66
+ #[ derive( Debug , Deserialize , Serialize ) ]
67
+ pub struct HealthCheck {
68
+ pub test : String ,
69
+ #[ serde( rename = "interval" , skip_serializing_if = "Option::is_none" ) ]
70
+ pub interval : Option < String > ,
71
+ #[ serde( rename = "timeout" , skip_serializing_if = "Option::is_none" ) ]
72
+ pub timeout : Option < String > ,
73
+ #[ serde( rename = "retries" , skip_serializing_if = "Option::is_none" ) ]
74
+ pub retries : Option < u32 > ,
75
+ #[ serde( rename = "start_period" , skip_serializing_if = "Option::is_none" ) ]
76
+ pub start_period : Option < String > ,
77
+ }
78
+
79
+ #[ derive( Debug , Deserialize , Serialize ) ]
80
+ #[ serde( untagged) ]
81
+ pub enum Command {
82
+ Single ( String ) ,
83
+ Multiple ( Vec < String > ) ,
56
84
}
57
85
58
86
impl ComposeConfig {
0 commit comments