version: '2'

services:

  postgres:
    image: postgres
    hostname: postgres
    environment:
      POSTGRES_USER: pootle
      POSTGRES_PASSWORD: cNEujap1w6OMSDGDIeE5TYS7aKl
      POSTGRES_DB: pootle

  elasticsearch:
    image: elasticsearch
    hostname: elasticsearch

  redis:
    image: redis
    hostname: redis

  nginx:
    image: nginx
    hostname: nginx
    volumes_from:
      - app

  app:
    build:
      context: .
    command: pootle runserver --insecure 0.0.0.0:8000
    ports:
      - "127.0.0.1:8000:8000"
    volumes:
      - ./pootle.conf:/etc/pootle/pootle.conf
      - /var/www/pootle/static
      - /var/www/pootle/media
    environment: &app_env
      POOTLE_SETTINGS: "/etc/pootle/pootle.conf"
    depends_on:
      - postgres
      - redis
      - elasticsearch

  rqworker:
    build:
      context: .
    command: pootle rqworker
    depends_on:
      - app
    volumes_from:
      - app
    environment:
      <<: *app_env

version: '2'

services:

  postgres:
    image: postgres
    hostname: postgres
    environment:
      POSTGRES_USER: pootle
      POSTGRES_PASSWORD: cNEujap1w6OMSDGDIeE5TYS7aKl
      POSTGRES_DB: pootle

  elasticsearch:
    image: elasticsearch
    hostname: elasticsearch

  redis:
    image: redis
    hostname: redis

  nginx:
    image: nginx
    hostname: nginx
    volumes_from:
      - pootle

  pootle:
    build:
      context: .
    command: runserver --insecure 0.0.0.0:8000
    ports:
      - "127.0.0.1:8000:8000"
    volumes:
      - ./pootle.conf:/etc/pootle/pootle.conf
      - /var/www/pootle/static
      - /var/www/pootle/media
    environment: &app_env
      POOTLE_SETTINGS: "/etc/pootle/pootle.conf"
    depends_on:
      - postgres
      - redis
      - elasticsearch

  rqworker:
    build:
      context: .
    command: rqworker
    depends_on:
      - pootle
    volumes_from:
      - pootle
    environment:
      <<: *app_env

Rename app service to pootle and remove pootle from commands as it is now the default entrypoint
Rename app service to pootle and remove pootle from commands as it is now the default entrypoint
