Configure services

Services allows you to run databases, message brokers, etc.

Add services

You can add new services by using the command-line:

dockup add <service>

This will update your dockup.config.ts file by adding the new service.

dockup.config.ts
import {  } from "dockup/config";
import {  } from "dockup/services";

export default ({
  : [()],
});

You can find the list of available services and their configuration in the registry.

Configure services

Each service accepts different options allowing you to configure their behaviour:

dockup.config.ts
import {  } from "dockup/config";
import { ,  } from "dockup/services";

export default ({
  : [
    ({
      : true, // Enable management dashboard
    }),
    ({
      : "postgres:16", // Use a different Docker image
    }),
  ],
});

You can find the list of available services and their configuration in the registry.

Services also accept an extend parameter for a more low-level configuration:

dockup.config.ts
import {  } from "dockup/config";
import { ,  } from "dockup/services";

export default ({
  : [
    ({
      : "postgres:16",
      : () =>
        .("POSTGRES_INITDB_ARGS", "--data-checksums"),
    }),
  ],
});

Multiple instances

Their are use cases where you want to run multiple instances of the same service. For this you can use the name option (defaults to the service name).

dockup.config.ts
import {  } from "dockup/config";
import {  } from "dockup/services";

export default ({
  : [
    ({
      : "db-1",
      : 5432,
    }),
    ({
      : "db-2",
      : 5433,
    }),
  ],
});