Skip to content

now-services

now-services is a pluggable collection of steps that let you run development services with now.

Installation

tack add now-services git+https://codeberg.org/now-runner/now-services.git --fetch
now.nix
let
  inputs = import ./.tack;
  services = import inputs.now-services;
in
{
  jobs.my_job.steps = [
    (services.postgresql { })
  ];
}
npins add git https://codeberg.org/now-runner/now-services.git
now.nix
let
  sources = import ./npins;
  services = import sources.now-services;
in
{
  jobs.my_job.steps = [
    (services.postgresql { })
  ];
}
flake.nix
{
  inputs = {
    # ...
    now-services.url = "git+https://codeberg.org/now-runner/now-services.git";
  };

  outputs =
    {
      now-services,
      ...
    }@inputs:
    {
      now.jobs.my_job.steps = [
        (now-services.postgresql { })
      ];
    };
}

Available services

Note

This documentation is auto-generated from the service definitions.

garage

Run Garage, an S3-compatible object store.

Available options:

garage.args

Command-line arguments passed to Garage.

Type: listOf<string>

garage.env

now environment for this step.

Type: attrs

garage.package

The Garage package to use.

Type: derivation

orchestrate

Orchestrate multiple now jobs, allowing you to run several services at once.

Available options:

orchestrate.env

now environment for this step.

Type: attrs

orchestrate.jobs

List of now job IDs to run concurrently.

Type: listOf<string>

orchestrate.nowArgs

List of common arguments to pass to each invocation of now run.

Type: listOf<string>

orchestrate.package

now package to use.

By default, the one in your PATH is used.

Type: derivation

orchestrate.strategy

How to handle any failing job.

Possible options:

  • "terminate": Terminate all other jobs.
  • "restart": Restart any failing jobs.
  • "ignore": Ignore the failing job and keep going.

Type: strategyEnum

Default:

"terminate"

postgresql

Run PostgreSQL, a relational database.

Available options:

postgresql.env

now environment for this step.

Type: attrs

postgresql.package

The PostgreSQL package to use.

Type: derivation

postgresql.unixSocket

Where to bind the Unix socket for PostgreSQL.

If unspecified, a random directory will be used.

Type: string

redis

Run Redis, an in-memory key-value database, or a derivative.

Available options:

redis.cliBinary

Name of the Redis client binary (for healthcheck).

If unspecified, it will be inferred from the package.

Type: string

redis.env

now environment for this step.

Type: attrs

redis.package

The Redis package to use.

Type: derivation

redis.serverBinary

Name of the Redis server binary.

If unspecified, it will be inferred from the package.

Type: string