#zeropsPreprocessor=on
services:
  # PostgreSQL — Zitadel's backing store
  - hostname: db
    type: postgresql@18
    mode: NON_HA

  # Zitadel API — Go binary on Ubuntu
  - hostname: api
    type: ubuntu@24.04
    envSecrets:
      ZITADEL_MASTERKEY: <@generateRandomString(<32>)>
      ZITADEL_FIRSTINSTANCE_ORG_HUMAN_USERNAME: admin
      ZITADEL_FIRSTINSTANCE_ORG_HUMAN_PASSWORD: <@generateRandomString(<14>)>aZ1!
      ZITADEL_FIRSTINSTANCE_ORG_HUMAN_EMAIL: admin@example.com
      ZITADEL_FIRSTINSTANCE_ORG_LOGINCLIENT_MACHINE_USERNAME: loginclient
      ZITADEL_FIRSTINSTANCE_ORG_LOGINCLIENT_MACHINE_NAME: IAM_LOGIN_CLIENT
      ZITADEL_FIRSTINSTANCE_ORG_LOGINCLIENT_PAT_EXPIRATIONDATE: "2030-01-01T00:00:00Z"
      ZITADEL_FIRSTINSTANCE_LOGINCLIENTPATPATH: /tmp/login-client.pat
      # Must be filled beforehand.
      ZITADEL_EXTERNALDOMAIN: liqkls78uveo514fbj194ch6st0.prg1-zerops.zone

  # Login v2 — Next.js on Node.js
  - hostname: login
    type: nodejs@22
