services:
  db:
    labels:
      dashboard.index: 2
      dashboard.title: Database
      dashboard.material-symbols-outlined: database
    image: alpine:3.19.1
    command: sleep 1h
    healthcheck:
      test: exit 0
      interval: 4s

  backend:
    labels:
      dashboard.index: 3
      dashboard.material-symbols-outlined: dns
      dashboard.link: http://localhost:8080/
      dashboard.extra-link: http://localhost:8080/api/
      dashboard.extra-text: API
    image: alpine:3.19.1
    command: sleep 1h
    healthcheck:
      test: exit 0
      interval: 4s

  frontend:
    labels:
      dashboard.index: 1
      dashboard.title: Frontoffice num2
      dashboard.material-symbols-outlined: laptop
      dashboard.link: http://localhost:4002/
      dashboard.extra-link: http://localhost:4002/storybook/
      dashboard.extra-text: Storybook
    image: alpine:3.19.1
    command: sleep 1h
    healthcheck:
      test: exit 0
      interval: 4s

  scrip-ok:
    image: alpine:3.19.1
    command: sleep 10s
    healthcheck:
      test: exit 0
      interval: 4s

  scrip-ko:
    image: alpine:3.19.1
    command: sh -c "sleep 10s ; exit 1"
    healthcheck:
      test: exit 0
      interval: 4s

#  docker-compose-dashboard:
#    labels:
#      dashboard.hide: true
#    image: docker-compose-dashboard
#    build: ..
#    volumes:
#      - ..:/host:ro
#      - /var/run/docker.sock:/var/run/docker.sock
#      - ../docker-compose-dashboard.ts:/docker-compose-dashboard.ts:ro
#    working_dir: /host/example
#    ports:
#      - 127.0.0.1:5555:5555
