version: '2'
services:
  web:
    image: registry.esss.lu.se/ics-infrastructure/csentry:master
    container_name: csentry_web
    command: pytest --cov=app -v
    depends_on:
      - postgres
      - redis
  worker:
    image: registry.esss.lu.se/ics-infrastructure/csentry:master
    container_name: csentry_worker
    command: flask runworker
    depends_on:
      - redis
  postgres:
    image: postgres:10
    container_name: csentry_postgres
    expose:
      - "5432"
    volumes:
      - ./postgres/create-test-db.sh:/docker-entrypoint-initdb.d/create-test-db.sh
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
      PGDATA: /var/lib/postgresql/data/pgdata
  redis:
    image: redis:4.0
    container_name: csentry_redis
