-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (65 loc) · 2.23 KB
/
Copy pathdocker-compose.yml
File metadata and controls
70 lines (65 loc) · 2.23 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
# REST Walkthrough Demo — Docker Compose
#
# Minimal stack: postgres + redis + decree-server.
# No SDK, no custom service — just the REST API on :8080.
#
# Ports:
# 8080 — Decree REST API (the only port you need for this demo)
services:
postgres:
image: postgres:17
environment:
POSTGRES_DB: centralconfig
POSTGRES_USER: centralconfig
POSTGRES_PASSWORD: localdev
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U centralconfig"]
interval: 2s
timeout: 5s
retries: 10
redis:
image: redis:7
command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 5s
retries: 10
# A fresh 0.12 database has no decree_app role (the server runs SET ROLE on
# every connection), so migrations must run before the server starts. The
# decree CLI image bundles them.
migrate:
image: ghcr.io/opendecree/decree-cli:0.12.0-alpha.4
depends_on:
postgres:
condition: service_healthy
environment:
DB_WRITE_URL: "postgres://centralconfig:localdev@postgres:5432/centralconfig?sslmode=disable"
command: ["migrate", "up"]
decree-server:
image: ghcr.io/opendecree/decree:0.12.0-alpha.4
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
migrate:
condition: service_completed_successfully
environment:
GRPC_PORT: "9090"
HTTP_PORT: "8080"
INSECURE_LISTEN: "1" # Plaintext gRPC/HTTP — local demo only
# This demo drives the REST API directly with curl, passing x-subject /
# x-role identity headers. The 0.12 HTTP gateway rejects those from clients
# by default (impersonation guard), so opt into trusted-proxy mode locally.
DECREE_GATEWAY_TRUSTED_PROXY: "1"
DB_WRITE_URL: "postgres://centralconfig:localdev@postgres:5432/centralconfig?sslmode=disable"
DB_READ_URL: "postgres://centralconfig:localdev@postgres:5432/centralconfig?sslmode=disable"
REDIS_URL: "redis://redis:6379"
ENABLE_SERVICES: "schema,config,audit"
ports:
- "8080:8080"
volumes:
pgdata: