1
1
x-lakekeeper-env : &lakekeeper-env
2
2
environment :
3
3
- LAKEKEEPER__PG_ENCRYPTION_KEY=insecure-encryption-key
4
- - LAKEKEEPER__PG_DATABASE_URL_READ=postgresql://postgres:postgres@postgres:5432/iceberg-catalog
5
- - LAKEKEEPER__PG_DATABASE_URL_WRITE=postgresql://postgres:postgres@postgres:5432/iceberg-catalog
4
+ - LAKEKEEPER__PG_DATABASE_URL_READ=postgresql://lakekeeper- postgres:lakekeeper- postgres@lakekeeper- postgres:5432/iceberg-catalog
5
+ - LAKEKEEPER__PG_DATABASE_URL_WRITE=postgresql://lakekeeper- postgres:lakekeeper- postgres@lakekeeper- postgres:5432/iceberg-catalog
6
6
- RUST_LOG=info
7
7
8
- name : etl
8
+ name : etl-pg-${POSTGRES_VERSION:-17}
9
9
10
10
services :
11
11
# Start Postgres
12
12
postgres :
13
13
image : postgres:${POSTGRES_VERSION:-17}
14
- container_name : postgres
15
14
environment :
16
15
POSTGRES_USER : ${POSTGRES_USER:-postgres}
17
16
POSTGRES_PASSWORD : ${POSTGRES_PASSWORD:-postgres}
@@ -20,10 +19,6 @@ services:
20
19
- " ${POSTGRES_PORT:-5430}:5432"
21
20
volumes :
22
21
- ${POSTGRES_DATA_VOLUME:-postgres_data}:/var/lib/postgresql/data
23
- configs :
24
- - source : postgres_init
25
- target : /docker-entrypoint-initdb.d/01-create-iceberg-catalog.sh
26
- mode : 0755
27
22
command : >
28
23
postgres
29
24
-N 1000
@@ -37,10 +32,24 @@ services:
37
32
timeout : 5s
38
33
retries : 5
39
34
35
+ lakekeeper-postgres :
36
+ image : postgres:17
37
+ environment :
38
+ POSTGRES_USER : ${LAKEKEEPER_POSTGRES_USER:-lakekeeper-postgres}
39
+ POSTGRES_PASSWORD : ${LAKEKEEPER_POSTGRES_PASSWORD:-lakekeeper-postgres}
40
+ POSTGRES_DB : ${LAKEKEEPER_POSTGRES_DB:-iceberg-catalog}
41
+ volumes :
42
+ - ${LAKEKEEPER_POSTGRES_DATA_VOLUME:-lakekeeper_postgres_data}:/var/lib/postgresql/data
43
+ restart : unless-stopped
44
+ healthcheck :
45
+ test : ["CMD-SHELL", "pg_isready -U ${LAKEKEEPER_POSTGRES_USER:-lakekeeper-postgres} -d ${LAKEKEEPER_POSTGRES_DB:-iceberg-catalog}"]
46
+ interval : 5s
47
+ timeout : 5s
48
+ retries : 5
49
+
40
50
# Start MinIO for S3-compatible object storage
41
51
minio :
42
52
image : minio/minio:latest
43
- container_name : minio
44
53
environment :
45
54
MINIO_ROOT_USER : minio-admin
46
55
MINIO_ROOT_PASSWORD : minio-admin-password
@@ -59,7 +68,6 @@ services:
59
68
# Create MinIO bucket
60
69
create-bucket :
61
70
image : minio/mc:latest
62
- container_name : create-bucket
63
71
depends_on :
64
72
minio :
65
73
condition : service_healthy
@@ -73,18 +81,16 @@ services:
73
81
# Migrate lakekeeper database
74
82
migrate-lakekeeper :
75
83
image : quay.io/lakekeeper/catalog:latest-main
76
- container_name : migrate-lakekeeper
77
84
<< : *lakekeeper-env
78
85
restart : " no"
79
86
command : ["migrate"]
80
87
depends_on :
81
- postgres :
88
+ lakekeeper- postgres :
82
89
condition : service_healthy
83
90
84
91
# Start lakekeeper, an iceberg REST catalog
85
92
lakekeeper :
86
93
image : quay.io/lakekeeper/catalog:latest-main
87
- container_name : lakekeeper
88
94
depends_on :
89
95
migrate-lakekeeper :
90
96
condition : service_completed_successfully
@@ -104,7 +110,6 @@ services:
104
110
# Bootstrap lakekeeper. After deployment, lakekeeper needs to be bootstrapped.
105
111
bootstrap-lakekeeper :
106
112
image : curlimages/curl
107
- container_name : bootstrap-lakekeeper
108
113
depends_on :
109
114
lakekeeper :
110
115
condition : service_healthy
@@ -127,7 +132,6 @@ services:
127
132
# Create a warehouse for development and testing
128
133
create-warehouse :
129
134
image : curlimages/curl
130
- container_name : create-warehouse
131
135
depends_on :
132
136
lakekeeper :
133
137
condition : service_healthy
@@ -153,18 +157,10 @@ services:
153
157
volumes :
154
158
- ./warehouse.json:/home/curl_user/warehouse.json
155
159
156
- configs :
157
- postgres_init :
158
- content : |
159
- #!/bin/bash
160
- set -e
161
-
162
- psql -v ON_ERROR_STOP=1 --username "${POSTGRES_USER:-postgres}" --dbname "${POSTGRES_DB:-postgres}" <<-EOSQL
163
- CREATE DATABASE "iceberg-catalog";
164
- EOSQL
165
-
166
160
volumes :
167
161
postgres_data :
168
162
driver : local
163
+ lakekeeper_postgres_data :
164
+ driver : local
169
165
minio_data :
170
166
driver : local
0 commit comments