Run multiple projects on one host

Use one yoink.yaml for each host and include the service fragments of each project repo.

Read as MarkdownEdit on GitHub

Use one yoink.yaml for each host. This central config collects the service fragments of each project repo through include:.

Prerequisites

  • A host config directory with a yoink.yaml for the host.
  • Each project repo is checked out next to the host config directory.
  • The age identity of the host config is available where you run the deploy.

Collect the project fragments

  1. Keep a services/<project>.yaml fragment in each project repo, next to the code.

  2. Add one include: entry for each project to the yoink.yaml of the host:

    # host-prod/yoink.yaml — the canonical config for `your-host`
    hosts:
      - { address: your-host, user: root }
    secrets:
      provider: age
      recipients: [age1…]
    
    include:
      - "services/*.yaml"
      - "../project-a/services/*.yaml"   # mount each project's services
      - "../project-b/services/*.yaml"   # alongside its own repo
  3. Go to the directory that contains the central yoink.yaml.

  4. Run yoink up.

yoink deploys the services of all projects as one cluster.

Deploy one project

Run the deploy for one service from the directory that contains the central yoink.yaml:

yoink up --service project-a-app

Coordination cost

The CI runner of each project needs the age identity of the host config. A fragment cannot contain a secrets: block: the secrets config lives only in the central yoink.yaml.

See also

Type a flag, a config field, or a task.