version: '2'

services:
  db:
    image: postgres
    env_file: env.env
    ports:
     - 5432:5432
    volumes:
      - ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
      - ./db/audio_data:/audio_data
      - ./db/postgres_data:/var/lib/postgresql/data
  api:
    build: api
    env_file: env.env
    command: python /code/runserver.py
    ports:
      - 5000:5000
    volumes:
      - ./api:/code
    depends_on:
      - db
    entrypoint: ./wait-for-it.sh db:5432 --
  web:
    image: nginx
    ports:
      - 8000:80
    volumes:
      - ./web/src:/usr/share/nginx/html
      - ./web/conf:/etc/nginx/conf.d
    depends_on:
      - api

version: '2'

services:
  db:
    image: postgres:9.6.1-alpine
    env_file: env.env
    ports:
     - 5432:5432
    volumes:
      - ./db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
      - ./db/audio_data:/audio_data
      - ./db/postgres_data:/var/lib/postgresql/data
  api:
    build: api
    env_file: env.env
    command: python /code/runserver.py
    ports:
      - 5000:5000
    volumes:
      - ./api:/code
    depends_on:
      - db
    entrypoint: ./wait-for-it.sh db:5432 --
  web:
    image: nginx:1.11.8-alpine
    ports:
      - 8000:80
    volumes:
      - ./web/src:/usr/share/nginx/html
      - ./web/conf:/etc/nginx/conf.d
    depends_on:
      - api

Use alpine based images for postgres and nginx
Use alpine based images for postgres and nginx
