Skip to content

Commit

Permalink
fix start function
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 13, 2024
1 parent 5e9cf97 commit db2fc61
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 9 deletions.
4 changes: 3 additions & 1 deletion caddy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["caddy", "--version"])?
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["type", "caddy"])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec![
"overmind start -f Procfile --daemonize || flox activate -- overmind restart caddy",
])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["overmind", "status"])?
.with_exec(vec!["curl", "-s", "http://localhost:$CADDY_PORT"])?
Expand Down
2 changes: 1 addition & 1 deletion dragonflydb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn start(_args: String) -> FnResult<String> {
.with_workdir(".fluentci")?
.with_exec(vec!["overmind", "--version"])?
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec!["overmind start -f Procfile --daemonize || flox activate -- overmind restart dragonflydb"])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["overmind", "status"])?
.stdout()?;
Expand Down
4 changes: 3 additions & 1 deletion httpbin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["gunicorn", "--version"])?
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["type", "gunicorn"])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec![
"overmind start -f Procfile --daemonize || flox activate -- overmind restart httpbin",
])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["overmind", "status"])?
.with_exec(vec!["curl", "-s", "http://localhost:$HTTPBIN_PORT"])?
Expand Down
4 changes: 3 additions & 1 deletion mariadb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["type", "mysql"])?
.with_exec(vec!["echo -e \"MySQL starting on port $MYSQL_PORT\""])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec![
"overmind start -f Procfile --daemonize || flox activate -- overmind restart mariadb",
])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["cat", "$MYSQL_HOME/mysql.log"])?
.with_exec(vec!["overmind", "status"])?
Expand Down
4 changes: 3 additions & 1 deletion mysql/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["type", "mysql"])?
.with_exec(vec!["echo -e \"MySQL starting on port $MYSQL_PORT\""])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec![
"overmind start -f Procfile --daemonize || flox activate -- overmind restart mysql",
])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["cat", "$MYSQL_HOME/mysql.log"])?
.with_exec(vec!["overmind", "status"])?
Expand Down
2 changes: 1 addition & 1 deletion nginx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec![
"echo -e \"Nginx starting on port $NGINX_WEB_PORT\\n http://localhost:$NGINX_WEB_PORT\"",
])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec!["overmind start -f Procfile --daemonize || flox activate -- overmind restart nginx"])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["overmind", "status"])?
.with_exec(vec!["curl", "-s", "http://localhost:$NGINX_WEB_PORT"])?
Expand Down
2 changes: 1 addition & 1 deletion php/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["type", "php"])?
.with_exec(vec!["type", "php-fpm"])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec!["overmind start -f Procfile --daemonize || || flox activate -- overmind restart php-fpm"])?
.with_exec(vec!["sleep", "2"])?
.with_exec(vec!["overmind", "status"])?
.wait_on(port.parse()?, None)?
Expand Down
4 changes: 3 additions & 1 deletion postgres/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["type", "postgres"])?
.with_exec(vec!["echo -e \"Postgres starting on port $PGPORT\""])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec![
"overmind start -f Procfile --daemonize || flox activate -- overmind restart postgres",
])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["overmind", "status"])?
.stdout()?;
Expand Down
4 changes: 3 additions & 1 deletion redis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ pub fn start(_args: String) -> FnResult<String> {
.with_exec(vec!["redis-server", "--version"])?
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["type", "redis-server"])?
.with_exec(vec!["overmind", "start", "-f", "Procfile", "--daemonize"])?
.with_exec(vec![
"overmind start -f Procfile --daemonize || flox activate -- overmind restart redis",
])?
.with_exec(vec!["overmind", "status"])?
.stdout()?;
Ok(stdout)
Expand Down

0 comments on commit db2fc61

Please sign in to comment.