Skip to content

Commit

Permalink
fix(dragonlydb): use pkgx instead of flox
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Jul 16, 2024
1 parent e28778f commit ee4166c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions dragonflydb/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ pub fn setup() -> Result<String, Error> {
}

let stdout = dag()
.flox()?
.pkgx()?
.with_workdir(".fluentci/dragondflydb")?
.with_exec(vec!["flox", "install", "docker", "overmind", "tmux"])?
.with_packages(vec![
"github.com/darthsim/overmind",
"github.com/tmux/tmux"])?
.with_exec(vec![
"grep -q dragonflydb Procfile || echo -e 'dragonflydb: docker run -p $DRAGONFLY_PORT:6379 --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly\\n' >> Procfile",
"grep -q dragonflydb Procfile || echo -e 'dragonflydb: pkgx docker run -p $DRAGONFLY_PORT:6379 --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly\\n' >> Procfile",
])?
.stdout()?;

Expand Down
6 changes: 3 additions & 3 deletions dragonflydb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ pub fn start(_args: String) -> FnResult<String> {
helpers::setup()?;
let port = dag().get_env("DRAGONFLY_PORT")?;
let stdout = dag()
.flox()?
.pkgx()?
.with_workdir(".fluentci/dragonflydb")?
.with_exec(vec!["overmind", "--version"])?
.with_exec(vec!["type", "overmind"])?
.with_exec(vec!["overmind start -f Procfile --daemonize || flox activate -- overmind restart dragonflydb"])?
.with_exec(vec!["overmind start -f Procfile --daemonize || overmind restart dragonflydb"])?
.wait_on(port.parse()?, None)?
.with_exec(vec!["overmind", "status"])?
.stdout()?;
Expand All @@ -30,7 +30,7 @@ pub fn stop(args: String) -> FnResult<String> {
};

let stdout = dag()
.flox()?
.pkgx()?
.with_workdir(".fluentci/dragonflydb")?
.with_exec(vec!["overmind", "stop", &args])?
.stdout()?;
Expand Down

0 comments on commit ee4166c

Please sign in to comment.