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
# =============================================================================
# Docker Compose for Rustberg Iceberg Catalog
# =============================================================================
#
# Production (default - authentication enabled):
# docker-compose up -d
#
# Development (no auth, for local testing only):
# docker-compose --profile dev up -d
#
# With MinIO storage:
# docker-compose --profile storage up -d
#
# =============================================================================
services:
# ---------------------------------------------------------------------------
# Rustberg Catalog Server (Production Mode - Auth Enabled)
# ---------------------------------------------------------------------------
rustberg:
build:
context: .
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
RUSTBERG_HOST: "0.0.0.0"
RUSTBERG_PORT: "8000"
RUSTBERG_INSECURE_HTTP: "true"
RUSTBERG_WAREHOUSE: "/var/lib/rustberg/warehouse"
# Authentication is enabled by default (no RUSTBERG_NO_AUTH)
RUSTBERG_CREATE_DEMO_KEY: "true"
RUSTBERG_MASTER_KEY: "${RUSTBERG_MASTER_KEY:-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef}"
RUST_LOG: "info"
volumes:
- rustberg-data:/var/lib/rustberg/data
- rustberg-warehouse:/var/lib/rustberg/warehouse
healthcheck:
test:
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
restart: unless-stopped
# ---------------------------------------------------------------------------
# Rustberg Development Mode (No Auth - FOR LOCAL TESTING ONLY)
# ---------------------------------------------------------------------------
rustberg-dev:
build:
context: .
dockerfile: Dockerfile
profiles:
- dev
ports:
- "8000:8000"
environment:
RUSTBERG_HOST: "0.0.0.0"
RUSTBERG_PORT: "8000"
RUSTBERG_INSECURE_HTTP: "true"
RUSTBERG_NO_AUTH: "true" # Explicitly disable auth for development
RUSTBERG_WAREHOUSE: "/var/lib/rustberg/warehouse"
RUST_LOG: "debug"
volumes:
- rustberg-dev-data:/var/lib/rustberg/data
- rustberg-dev-warehouse:/var/lib/rustberg/warehouse
healthcheck:
test:
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
# ---------------------------------------------------------------------------
# MinIO for S3-compatible object storage (optional)
# ---------------------------------------------------------------------------
minio:
image: minio/minio:latest
profiles:
- storage
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
healthcheck:
test:
interval: 30s
timeout: 20s
retries: 3
volumes:
rustberg-data:
rustberg-dev-data:
rustberg-warehouse:
rustberg-dev-warehouse:
minio-data:
# =============================================================================
# Usage Examples:
#
# 1. Start production server (with authentication):
# docker-compose up -d
#
# 2. Start development server (no authentication):
# docker-compose --profile dev up -d
#
# 3. Start with MinIO storage:
# docker-compose --profile storage up -d
#
# 4. Generate API key (production):
# docker-compose exec rustberg rustberg generate-key --name admin --roles admin
#
# 5. Create backup:
# docker-compose exec rustberg rustberg backup --output /tmp/backup.tar.gz
#
# 6. View logs:
# docker-compose logs -f rustberg
#
# 7. Check health:
# curl http://localhost:8000/health
# curl http://localhost:8000/ready
#
# Security Notes:
# - Production mode (default) requires API key authentication
# - Development mode (--profile dev) disables auth - NEVER use in production
# - Set RUSTBERG_MASTER_KEY to a secure random value in production
# - Consider enabling TLS for production deployments
#
# =============================================================================