version: '3'
services:
  postgres:
    image: postgres:9.6.11
    restart: always
    # Set port to non-standard value to not use Travis CI Postgres server.
    command: postgres -p 5434

  django:
    build:
      context: .
      dockerfile: ./Dockerfile-local
    command: /dthm4kaiako/dthm4kaiako/docker-development-entrypoint.sh
    volumes:
      - .:/dthm4kaiako
    environment:
      - PORT=8080
      - USE_DOCKER=yes
      - DATABASE_URL=postgres://postgres@postgres:5434/postgres
      - DJANGO_SETTINGS_MODULE=config.settings.local
      - INCLUDE_INCONTEXT_L10N=False
      - GOOGLE_DRIVE_API_KEY=${GOOGLE_DRIVE_API_KEY}
    depends_on:
      - postgres

  nginx:
    build:
      context: .
      dockerfile: ./infrastructure/nginx/Dockerfile
    volumes:
      - ./dthm4kaiako/:/app/
      - /app/node_modules
    depends_on:
      - django
    ports:
      - "82:80"

  elasticsearch:
    image: elasticsearch:2
    restart: always

version: '3'
services:
  postgres:
    image: postgres:9.6.11
    restart: always
    # Set port to non-standard value to not use Travis CI Postgres server.
    command: postgres -p 5434

  django:
    build:
      context: .
      dockerfile: ./Dockerfile-local
    command: /dthm4kaiako/dthm4kaiako/docker-development-entrypoint.sh
    volumes:
      - .:/dthm4kaiako
    environment:
      - PORT=8080
      - USE_DOCKER=yes
      - DATABASE_URL=postgres://postgres@postgres:5434/postgres
      - DJANGO_SETTINGS_MODULE=config.settings.local
      - INCLUDE_INCONTEXT_L10N=False
      - GOOGLE_DRIVE_API_KEY=${GOOGLE_DRIVE_API_KEY}
    depends_on:
      - postgres

  nginx:
    build:
      context: .
      dockerfile: ./infrastructure/nginx/Dockerfile
    volumes:
      - ./dthm4kaiako/:/app/
      - /app/node_modules
    depends_on:
      - django
    ports:
      - "82:80"

  elasticsearch:
    image: elasticsearch:5
    restart: always

Use Elasticsearch 5 docker image for local development
Use Elasticsearch 5 docker image for local development
