daemonslayer/tests-airflow

View on GitHub
src/etl/docker-compose-hive.yml

Summary

Maintainability
Test Coverage
version: '2'
services:
  postgres:
      image: postgres:9.6
      container_name: postgres-docker
      environment:
          - POSTGRES_USER=airflow
          - POSTGRES_PASSWORD=airflow
          - POSTGRES_DB=airflow
      ports:
          - 5432:5432
      volumes:
          - ./examples/do-this-first/database_user.sql:/docker-entrypoint-initdb.d/database_user.sql
          - ./examples/do-this-first/populate_tables.sql:/docker-entrypoint-initdb.d/populate_tables.sql
  hive:
      image: cloudera/quickstart:latest
      container_name: hive-docker
      restart: always
      depends_on:
          - postgres
      ports:
          - 8888:8888
          - 10000:10000
          - 7180:7180
          - 8020:8020
      hostname: quickstart.cloudera
      privileged: true
      tty: true
      command: /usr/bin/docker-quickstart
  webserver:
      image: gtoonstra/docker-airflow:latest
      container_name: airflow
      restart: always
      depends_on:
          - postgres
          - hive
      environment:
          - LOAD_EX=n
          - EXECUTOR=Local
          - INSTALL_HIVE=y
      volumes:
          - ./examples/hive-example/dags:/usr/local/airflow/dags
          - ./examples/hive-example/sql:/usr/local/airflow/sql
          - ./examples/hive-example/hql:/usr/local/airflow/hql
          - ./examples/hive-example/core-site.xml:/core-site.xml
          - ./examples/hive-example/hdfs-site.xml:/hdfs-site.xml
          - ./examples/hive-example/mapred-site.xml:/mapred-site.xml
      ports:
          - 8080:8080
      command: webserver