# Copyright 1999-2025. WebPros International GmbH.
version: '3'
services:
  plesk:
    image: plesk/plesk:latest
    logging:
      driver: none
    ports:
      ["8443:8443"]
    tmpfs:
      - /tmp
      - /run
      - /run/lock
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup
    cgroup: host
  tests:
    build: .
    environment:
      REMOTE_URL: https://plesk:8443
      REMOTE_PASSWORD: changeme1Q**
    command: >
      bash -c "cd /opt/api-php-lib
      && composer install
      && ./wait-for-plesk.sh
      && composer lint
      && composer test -- --testdox"
    depends_on:
      - plesk
    links:
      - plesk
    volumes:
      - .:/opt/api-php-lib
