version: '3.3'

services:
  elasticsearch:
    image: ${ES_IMAGE_NAME}:${ES_IMAGE_VERSION}
    container_name: ${ES_CONTAINER_NAME}
    restart: always
    ports:
      - "${ES_PORT}:${ES_PORT}"
    environment:
      - xpack.security.enabled=false
      - discovery.type=single-node
  mongo:
    image: ${MDB_IMAGE_NAME}:${MDB_IMAGE_VERSION}
    container_name: ${MDB_CONTAINER_NAME}
    restart: always
    ports: 
      - ${MDB_PORT}:${MDB_PORT}
  freeland:
    image: ${IMAGE_NAME}:${IMAGE_VERSION}
    build:
      context: .
      dockerfile: Dockerfile
    container_name: ${CONTAINER_NAME}
    restart: always
    links:
      - "elasticsearch:localhost"
    ports:
      - "${LOCAL_PORT}:${NODE_PORT}"
    environment:
      - NODE_ENV=  ${NODE_ENV}
      - NODE_PORT= ${NODE_PORT}