Added command
This commit is contained in:
@@ -8,6 +8,7 @@ depend = ["nc-test-database"]
|
||||
restart = "unless-stopped"
|
||||
detach = true
|
||||
hostname = "nc-test-api-hn"
|
||||
command = "dotnet NumberChords.Api.dll"
|
||||
|
||||
[service.healthcheck]
|
||||
cmd = "pg_isready --dbname=$DB_DATABASE_NAME --username=$DB_USERNAME || exit 1"
|
||||
|
||||
@@ -94,6 +94,10 @@ pub fn generate_openrc(config: &ServiceConfig) {
|
||||
|
||||
arguments.push(config.service.image.clone());
|
||||
|
||||
if let Some(command) = &config.service.command {
|
||||
arguments.push(command.clone());
|
||||
}
|
||||
|
||||
script.push_str(&wrap(&format!("podman run {}", arguments.iter()
|
||||
.enumerate()
|
||||
.map(|(i, arg)| if i > 0 { format!("\t{}", arg) } else { arg.to_string() })
|
||||
|
||||
@@ -36,6 +36,7 @@ pub struct Service {
|
||||
pub restart: Option<String>,
|
||||
pub detach: Option<bool>,
|
||||
pub healthcheck: Option<HealthCheck>,
|
||||
pub command: Option<String>,
|
||||
|
||||
#[serde(default)]
|
||||
pub depend: Vec<String>,
|
||||
|
||||
Reference in New Issue
Block a user