version: '3'

volumes:
  deps:
  bundle:
  node_modules:
  build:

services:
  postgres:
    image: postgres

  redis:
    image: redis

  web:
    build: .
    image: asciinema/asciinema.org
    command: mix test
    links:
      - redis
      - postgres
    env_file: .env
    volumes:
      - deps:/app/deps:cached
      - bundle:/bundle:cached
      - node_modules:/app/node_modules:cached
      - build:/app/_build:cached
      - ../:/app:cached
