version: "3.7"

services:
  postgresql:
    image: postgres:10.3-alpine
    ports:
      - 5432:5432
    volumes:
      - ../_postgresql/data:/var/lib/postgresql/data
  redis:
    image: redis:4.0.11-alpine3.8
    ports:
      - 6379:6379
    volumes:
      - ../_redis/data:/data
  webpack:
    build:
      context: .
      dockerfile: ./app/frontend/Dockerfile.dev
    command: /bin/ash -c 'yarn webpack:start'
    volumes:
      - ./:/annict
    ports:
      - 8080:8080
  rails:
    build:
      context: .
      dockerfile: ./Dockerfile.dev
    command: /bin/ash -c 'rm -rf tmp/pids/server.pid; bundle exec rails s -b 0.0.0.0'
    depends_on:
      - postgresql
      - redis
      - webpack
    env_file:
      - .env.development
      - .env.development.local
    ports:
      - 3000:3000
    stdin_open: true # for Pry
    tty: true # for Pry
    volumes:
      - ./:/annict
  sidekiq:
    build:
      context: .
      dockerfile: ./Dockerfile.dev
    command: /bin/ash -c 'bundle exec sidekiq'
    depends_on:
      - postgresql
      - redis
    env_file:
      - .env.development
      - .env.development.local

version: "3.7"

services:
  postgresql:
    image: postgres:10.3-alpine
    ports:
      - 5432:5432
    volumes:
      - ../_postgresql/data:/var/lib/postgresql/data
  redis:
    image: redis:3.2.12-alpine3.8
    ports:
      - 6379:6379
    volumes:
      - ../_redis/data:/data
  webpack:
    build:
      context: .
      dockerfile: ./app/frontend/Dockerfile.dev
    command: /bin/ash -c 'yarn webpack:start'
    volumes:
      - ./:/annict
    ports:
      - 8080:8080
  rails:
    build:
      context: .
      dockerfile: ./Dockerfile.dev
    command: /bin/ash -c 'rm -rf tmp/pids/server.pid; bundle exec rails s -b 0.0.0.0'
    depends_on:
      - postgresql
      - redis
      - webpack
    env_file:
      - .env.development
      - .env.development.local
    ports:
      - 3000:3000
    stdin_open: true # for Pry
    tty: true # for Pry
    volumes:
      - ./:/annict
  sidekiq:
    build:
      context: .
      dockerfile: ./Dockerfile.dev
    command: /bin/ash -c 'bundle exec sidekiq'
    depends_on:
      - postgresql
      - redis
    env_file:
      - .env.development
      - .env.development.local

Use Redis 3.2.12 in development
Use Redis 3.2.12 in development

Because Heroku Redis is 3.2.12
