Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
140 lines (132 loc) · 5.58 KB
/
Copy pathdocker-compose.yml
File metadata and controls
140 lines (132 loc) · 5.58 KB
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Backend stack for the E2E matrix engine.
# Orchestrated by run.mjs, which sets TEST_MODE (selects modes/<mode>.env) and
# LK_IMAGE (OSS vs Plus). Ports match the apps' existing .env so no app rewiring
# is needed: lakekeeper :8181, keycloak :30080, openfga :35081, postgres :5432.
#
# Host networking note: lakekeeper reaches keycloak via host.docker.internal:30080
# (the *published* port) so the token issuer matches what the browser sees
# (http://localhost:30080). OPENID_ADDITIONAL_ISSUERS in the mode files accepts the
# localhost form too.
x-lk-common: &lk-common
image: ${LK_IMAGE:-quay.io/lakekeeper/catalog:latest-main}
env_file:
# run.mjs writes .generated-<mode>.env with the chosen keycloak host port
# substituted; MODE_ENV_FILE names it. Falls back to the checked-in file.
- ./modes/${MODE_ENV_FILE:-${TEST_MODE:-authn}.env}
environment:
# Injected from .env.secret by run.mjs (only the cedar mode needs it).
LAKEKEEPER__LICENSE__KEY: ${LAKEKEEPER__LICENSE__KEY:-}
volumes:
# Cedar policy files. Harmless to mount in other modes.
- ${CEDAR_POLICY_DIR}:/policies:ro
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
postgres:
condition: service_healthy
services:
postgres:
image: postgres:16.4
command: ["-c", "max_connections=10000"]
environment:
POSTGRES_PASSWORD: postgres
# Published on a non-default host port so a natively-running lakekeeper
# (LK_BIN) can reach it, while still not clashing with a dev postgres on
# :5432. run.mjs picks PG_HOST_PORT from the first free candidate.
ports:
- "${PG_HOST_PORT:-55432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 2s
timeout: 3s
retries: 30
openfga:
image: openfga/openfga:v1.8
command: run
# Published for the same reason as postgres: a natively-running lakekeeper
# (LK_BIN) has no compose network to reach it on.
ports:
- "${FGA_HOST_PORT:-58081}:8081"
# S3-compatible object storage for warehouse tests (Silo, a maintained fork of
# MinIO). Reached by lakekeeper at http://silo:9000 over the compose network;
# the browser/LoQE use the host LAN IP that run.mjs injects.
#
# Silo serves the S3 API and the STS AssumeRole endpoint from one process with
# no IAM config — the warehouse points `sts-endpoint` at the same URL and needs
# no role ARN, so there is no IAM file to keep in sync.
# Image and settings follow lakekeeper's own examples/minimal compose.
silo:
image: pgsty/silo:RELEASE.2026-09-03T13-18-01Z
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: lakekeeper
MINIO_ROOT_PASSWORD: lakekeeper-secret
# LoQE reads and writes this bucket straight from the browser, so the S3
# API has to answer cross-origin. Server-wide here, which replaces the
# per-bucket CORS rule bucket-init used to PUT.
#
# An explicit LIST, not "*": storage/cors.spec.ts proves a SELECT works
# from the app's origin and is BLOCKED from another one, and a wildcard
# makes that unprovable — every origin is allowed, so nothing can fail.
# :3001 is the app, :8181 the served-UI image. :3002 is deliberately
# absent: it is the second app instance that spec uses as the foreign
# origin.
MINIO_API_CORS_ALLOW_ORIGIN: "${SILO_CORS_ORIGINS:-http://localhost:3001,http://127.0.0.1:3001,http://localhost:8181,http://127.0.0.1:8181}"
healthcheck:
# The image ships mc, so readiness is a real check rather than a retry loop.
test: ["CMD", "mc", "ready", "local"]
interval: 2s
timeout: 10s
retries: 5
start_period: 15s
ports:
# Host port is configurable (run.mjs sets S3_LOCAL_HOST_PORT, default 8334)
# so the e2e coexists with anything already holding :9000. The container
# always listens on 9000; the warehouse endpoint uses host LAN IP + this.
- "${S3_LOCAL_HOST_PORT:-8334}:9000" # S3 API (browser/LoQE)
# The same S3 API on a port browsers refuse to connect to (Fetch standard's
# bad-ports list). lakekeeper reaches it via the host LAN IP, the browser
# does not — which is the asymmetry specs/storage/reachability.spec.ts needs
# to prove the console blames the port rather than CORS.
- "${S3_BADPORT_HOST_PORT:-6697}:9000"
# One-shot: create the warehouse test bucket. Uses the silo image for its
# bundled mc, so no second CLI image is pulled.
bucket-init:
image: pgsty/silo:RELEASE.2026-09-03T13-18-01Z
depends_on:
silo:
condition: service_healthy
entrypoint: /bin/sh
command:
- -c
- |
mc alias set local http://silo:9000 lakekeeper lakekeeper-secret &&
mc mb --ignore-existing local/lakekeeper-test &&
mc mb --ignore-existing local/lakekeeper-badport
restart: "no"
keycloak:
image: quay.io/keycloak/keycloak:26.0.7
command:
- start-dev
- --import-realm
- --health-enabled=true
- --features=token-exchange
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
volumes:
- ${KEYCLOAK_REALM_FILE}:/opt/keycloak/data/import/realm.json:ro
ports:
- "${KC_HOST_PORT:-30080}:8080"
# One-shot DB/authz migration. Run via `docker compose run --rm migrate`.
migrate:
<<: *lk-common
command: migrate
restart: "no"
lakekeeper:
<<: *lk-common
command: serve
ports:
- "8181:8181"
# Readiness is polled over HTTP by run.mjs (http://localhost:8181/health),
# which avoids depending on the in-container binary path.