version: "3"

services:
  hive:
    build: .
    entrypoint: /init-hive.sh
    ports:
      - "9083:9083"
      - "10000:10000"
    links:
      - "postgres:postgres"

  spark:
    build: .
    entrypoint: /init-spark.sh
    ports:
      - "10001:10001"
    links:
      - "postgres:postgres"
      - "hive:hive"

  postgres:
    image: postgres:10
    environment:
      - POSTGRES_USER=hive
      - POSTGRES_PASSWORD=hive
      - POSTGRES_DB=metastore