-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
129 lines (115 loc) · 3.82 KB
/
Copy pathdocker-compose.yml
File metadata and controls
129 lines (115 loc) · 3.82 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
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copyright (C) 2025 Shahzad A. Bhatti <bhatti@plexobject.com>
#
# Docker Compose for PlexSpaces deployment
# Production-ready setup with PostgreSQL and an S3-compatible object store
#
# This setup demonstrates:
# - Empty node with default application (no actors)
# - Shared PostgreSQL database for scheduler, workflow, object-registry, journaling, blob, locks
# - SQLite for channels (single-node durability)
# - RustFS for blob storage (S3-compatible, pure Rust)
#
# Configuration is managed via release.yaml and environment variables
version: '3.8'
services:
# PostgreSQL for shared relational database
postgres:
image: postgres:16-alpine
container_name: plexspaces-postgres
environment:
POSTGRES_USER: plexspaces
POSTGRES_PASSWORD: plexspaces
POSTGRES_DB: plexspaces
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U plexspaces"]
interval: 5s
timeout: 3s
retries: 5
networks:
- plexspaces-net
# RustFS for blob storage (S3-compatible, pure Rust)
object-store:
image: rustfs/rustfs:latest
container_name: plexspaces-object-store
ports:
- "9000:9000"
environment:
RUSTFS_ADDRESS: "0.0.0.0:9000"
RUSTFS_DATA: /data
volumes:
- object-store-data:/data
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:9000/"]
interval: 10s
timeout: 5s
retries: 5
networks:
- plexspaces-net
# PlexSpaces node (empty, ready for deployments)
plexspaces-node:
build: .
container_name: plexspaces-node
hostname: node1
ports:
- "8000:8000" # gRPC + HTTP (single port)
environment:
# Node configuration
- NODE_ID=node1
- NODE_LISTEN_ADDRESS=0.0.0.0:8000
- GRPC_ADDRESS=0.0.0.0:8000
# Release configuration
- PLEXSPACES_RELEASE_CONFIG=/app/config/release.yaml
# Database configuration
- DATABASE_URL=postgres://plexspaces:plexspaces@postgres:5432/plexspaces
# Backend configurations (all using PostgreSQL)
- LOCKS_BACKEND=postgres
- LOCKS_POSTGRES_URL=postgres://plexspaces:plexspaces@postgres:5432/plexspaces
- CHANNEL_BACKEND=sqlite
- CHANNEL_SQLITE_PATH=:memory:
- KEYVALUE_BACKEND=sql
- TUPLESPACE_BACKEND=sql
# Blob storage configuration (external object-store container)
- BLOB_BACKEND=embedded
- BLOB_BUCKET=plexspaces
- BLOB_ENDPOINT=http://object-store:9000
# Security configuration
# Auth is ENABLED by default (production-ready)
# To disable auth for testing, uncomment the line below or override via:
# docker-compose run -e PLEXSPACES_DISABLE_AUTH=1 plexspaces-node
# - PLEXSPACES_DISABLE_AUTH=1
# JWT configuration (required when auth is enabled)
# Set JWT secret for production, or disable auth for testing
- PLEXSPACES_JWT_SECRET=${PLEXSPACES_JWT_SECRET:-test-secret}
# mTLS configuration (optional, can use auto-generation)
# Uncomment and mount certs volume for production:
# - PLEXSPACES_MTLS_CA_CERT=/app/certs/ca.crt
# - PLEXSPACES_MTLS_SERVER_CERT=/app/certs/server.crt
# - PLEXSPACES_MTLS_SERVER_KEY=/app/certs/server.key
# Logging (default: info)
- RUST_LOG=${RUST_LOG:-info}
volumes:
- ./config:/app/config:ro
healthcheck:
test: ["CMD", "grpc_health_probe", "-addr=:8000", "-service=readiness"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
networks:
- plexspaces-net
depends_on:
postgres:
condition: service_healthy
object-store:
condition: service_healthy
volumes:
postgres-data:
object-store-data:
networks:
plexspaces-net:
driver: bridge