# This Docker Compose file is used to set up the environment for the tests.
services:
  lldap:
    extends:
      file: docker-compose.yml
      service: lldap
  scim-test-server:
    extends:
      file: docker-compose.yml
      service: scim-test-server
  postgres:
    image: postgres:17
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - POSTGRES_DB=pocket-id
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5
  pocket-id:
    extends:
      file: docker-compose.yml
      service: pocket-id
    environment:
      - APP_ENV=test
      - DB_CONNECTION_STRING=postgres://postgres:postgres@postgres:5432/pocket-id
      - FILE_BACKEND=${FILE_BACKEND}
    depends_on:
      postgres:
        condition: service_healthy

volumes:
  pocket-id-test-data:
