# docker-compose file for running tox tests locally
version: '3.2'
services:
  tox:
    build:
      context: .
      dockerfile: ./Dockerfile
    entrypoint: []
    command: ["tox", "-e", "coverage,flake8"]
    environment:
      - TOXINI_WORK_DIR=/tmp/tox-data/work
      - TOXINI_ARTEFACT_DIR=/tmp/tox-data/artefacts
      - TOXINI_COVERAGE_FILE=/tmp/tox-coverage
    volumes:
      - tox-data:/tmp/tox-data
      - ./:/usr/src/app:ro

volumes:
  # A persistent volume for tox to store its stuff. This allows caching of
  # virtualenvs between runs.
  tox-data:
