Skip to content

Examples

supplier-portal-api

The Supplier portal API lab: one lab, two implementations per machine (containers or native VMs), so it runs on every target.

Tested: Generated and checked in CI; not started there.

version: 1
name: supplier-portal-api

networks:
  lab: { cidr: 10.20.0.0/24 }

inputs: [API_URL, LAUNCH_TOKEN]

machines:
  database:
    networks: { lab: 32 }
    services: [{ port: 3207, name: mysql }]
    inputs: [API_URL, LAUNCH_TOKEN]
    resources: { cpus: 1, memory_mb: 1024 }
    docker:
      image: mysql:8.0
      init: [build/database/seed.sh]
    vm:
      os: debian-12
      provision: [provision/database.sh]

  web:
    networks: { lab: 31 }
    services: [{ port: 3206, name: portal, http: true, publish: 3206 }]
    depends_on: [database]
    resources: { cpus: 1, memory_mb: 1024 }
    docker:
      build: build/web
    vm:
      os: debian-12
      provision: [provision/web.sh]

checks:
  - build/check/check.sh

Targets

docker, hosted, cloud-docker, vagrant, proxmox, cloud-vm. See Targets for what each means.