-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
101 lines (95 loc) · 2.51 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: "3.7"
services:
hive-metastore:
image: 'naushadh/hive-metastore'
container_name: hive-metastore
hostname: hive-metastore
ports:
- '9083:9083' # Metastore Thrift
environment:
- DATABASE_HOST=postgresdb
- DATABASE_DB=metastore_db
- DATABASE_USER=admin
- DATABASE_PASSWORD=admin
- S3_PREFIX=myminio
- S3_BUCKET=warehouse
- S3_ENDPOINT_URL=http://minio:9000
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
depends_on:
- postgresdb
- minio
networks:
- dbt_sample_network
spark-thrift:
image: spark-thrift
container_name: spark-thrift
build:
context: .
dockerfile: SparkThriftDockerfile
ports:
- "10000:10000"
- "4040:4040"
depends_on:
- hive-metastore
command: >
--class org.apache.spark.sql.hive.thriftserver.HiveThriftServer2
--name Thrift JDBC/ODBC Server
--hiveconf hive.server2.thrift.bind.host=0.0.0.0
volumes:
- ./.spark-warehouse/:/spark-warehouse/
- ./config/hive-site.xml:/usr/spark/conf/hive-site.xml
- ./config/spark-defaults.conf:/usr/spark/conf/spark-defaults.conf
environment:
- WAIT_FOR=hive-metastore:9083
- AWS_ACCESS_KEY_ID=minioadmin
- AWS_SECRET_ACCESS_KEY=minioadmin
- HIVE_SERVER2_THRIFT_BIND_HOST=spark-thrift
networks:
- dbt_sample_network
postgresdb:
image: 'postgres:latest'
hostname: postgresdb
container_name: postgresdb
ports:
- '5432:5432'
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
POSTGRES_DB: metastore_db
volumes:
- ./.hive-metastore:/var/lib/postgresql/data
networks:
- dbt_sample_network
minio:
image: 'minio/minio:latest'
hostname: minio
container_name: minio
ports:
- '9000:9000'
- '9001:9001'
volumes:
- .minio-data:/data
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
MINIO_API_SELECT_PARQUET: "on"
command: server --console-address ":9001" /data
networks:
- dbt_sample_network
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb myminio/warehouse;
/usr/bin/mc policy download myminio/warehouse;
exit 0;
"
networks:
- dbt_sample_network
networks:
dbt_sample_network:
driver: bridge