-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.init.yml
117 lines (111 loc) · 3.38 KB
/
docker-compose.init.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
version: '3'
services:
##### Catalog Services - Start #####
### For YBDB - Start ###
# catalog-db:
# platform: linux/amd64
# image: yugabytedb/yugabyte:latest
# container_name: rtdl_catalog-db
# volumes:
# - ./storage/rtdl-catalog-db_data:/home/yugabyte/yb_data
# command: ["bin/yugabyted", "start", "--base_dir=/home/yugabyte/yb_data", "--daemon=false"]
# expose:
# - 5433
# ports:
# - 5433:5433
# healthcheck:
# test: ["CMD", "yb-ts-cli", "--server_address=localhost", "is_server_ready"]
# interval: 10s
# timeout: 5s
# retries: 12
# catalog-db-init:
# platform: linux/amd64
# image: rtdl/psql-client:latest
# container_name: rtdl_catalog-db-init
# volumes:
# - ./scripts/create-user-db.postgres.sql:/create-user-db.postgres.sql
# entrypoint: psql -h catalog-db -p 5433 -U yugabyte -f /create-user-db.postgres.sql
# deploy:
# restart_policy:
# condition: on-failure
# delay: 5s
# max_attempts: 5
# window: 10s
# depends_on:
# catalog-db:
# condition: service_healthy
# catalog:
# platform: linux/amd64
# image: rtdl/hive-metastore
# container_name: rtdl_catalog-init
# expose:
# - 9083
# ports:
# - 9083:9083
# volumes:
# - ./scripts/entrypoint-init.sh:/entrypoint.sh
# - ./conf/metastore-site.ybdb.xml:/opt/apache-hive-metastore-3.1.2-bin/conf/metastore-site.xml
# entrypoint: sh -c "chown hive:hive /entrypoint.sh && chmod +x /entrypoint.sh && sh -c /entrypoint.sh"
# depends_on:
# catalog-db:
# condition: service_healthy
# catalog-db-init:
# condition: service_completed_successfully
### For YBDB - End ###
### For Postgres - Start ###
catalog-db:
platform: linux/amd64
image: postgres:latest
container_name: rtdl_catalog-db
volumes:
- ./storage/rtdl-catalog-db_data:/var/lib/postgresql/data
expose:
- 5432
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 12
catalog-db-init:
platform: linux/amd64
image: rtdl/psql-client:latest
container_name: rtdl_catalog-db-init
volumes:
- ./scripts/create-user-db.postgres.sql:/create-user-db.postgres.sql
entrypoint: psql -h catalog-db -p 5432 -U postgres -f /create-user-db.postgres.sql
environment:
PGPASSWORD: postgres
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 5
window: 10s
depends_on:
catalog-db:
condition: service_healthy
catalog:
platform: linux/amd64
image: rtdl/hive-metastore
container_name: rtdl_catalog-init
expose:
- 9083
ports:
- 9083:9083
volumes:
- ./scripts/entrypoint-init.sh:/entrypoint.sh
- ./conf/metastore-site.postgres.xml:/opt/apache-hive-metastore-3.1.2-bin/conf/metastore-site.xml
user: root
entrypoint: bash -c "chown hive:hive /entrypoint.sh && chmod +x /entrypoint.sh && bash -c /entrypoint.sh"
depends_on:
catalog-db:
condition: service_healthy
catalog-db-init:
condition: service_completed_successfully
### For Postgres - End ###
##### Catalog Services - End #####