version: '2'
services:

  php:
    build:
      context: ../..
      dockerfile: tests/mssql/Dockerfile
    # Alternative pre-built image (TODO: evaluate)
    #image: ppoffice/apache-php-mssql-odbc
    ports:
      - 80
    # Enable for debugging, Note: File-cache tests may be VERY slow or fail
    #volumes:
    #  - ../../..:/project
    volumes:
      - ../../tests/data/config-docker.php:/project/tests/data/config.php
    depends_on:
      - mssql
    # Enable for debugging
    #entrypoint: ['bash']

  mssql:
    image: microsoft/mssql-server-linux
    # Alternative pre-built image (TODO: evaluate)
    #image: microsoft/mssql-server-windows
    environment:
      - ACCEPT_EULA=Y
      - SA_PASSWORD=Microsoft-12345

  sqlcmd:
    image: tsgkadot/mssql-tools
    # Mount project for accessing SQL dump (TODO)
    volumes:
      - ../..:/project
    # Enable for debugging
    #entrypoint: ['bash']
