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
# Local development setup for siglog transparency log ecosystem
#
# Setup:
# uv run scripts/setup_local.py # Generates .env with keys
#
# Usage:
# docker compose build
# docker compose up
#
# This runs three services:
# - log: The transparency log server (port 8080)
# - witness: A Rust witness server (port 8081)
# - monitor: The conda monitor with validation (port 8082)
#
# Test endpoints:
# curl http://localhost:8080/health # Log health
# curl http://localhost:8080/checkpoint # Current checkpoint
# curl http://localhost:8081/health # Rust witness health
# curl http://localhost:8082/health # Monitor health
# curl http://localhost:8082/stats # Monitor stats
services:
log:
build:
context: .
dockerfile: Dockerfile.local
command:
- siglog
- --database-url=sqlite:/data/siglog.db?mode=rwc
- --storage-backend=fs
- --fs-root=/data/tiles
- --origin=local.dev/log
- --private-key=${LOG_PRIVATE_KEY}
- --listen=0.0.0.0:8080
- --checkpoint-interval=1
- --batch-max-size=256
- --batch-max-age-ms=500
- --vindex-enabled
- --vindex-key-field=name
- --external-witnesses=witness=http://witness:8080,monitor=http://monitor:8080
environment:
RUST_LOG: info,siglog=debug
ports:
- "8080:8080"
volumes:
- log-data:/data
healthcheck:
test:
interval: 5s
timeout: 3s
retries: 10
start_period: 10s
witness:
build:
context: .
dockerfile: Dockerfile.local
command:
- witness
- --database-url=sqlite:/data/witness.db?mode=rwc
- --private-key=${WITNESS_PRIVATE_KEY}
- --listen=0.0.0.0:8080
- --log=local.dev/log=${LOG_PUBLIC_KEY}
environment:
RUST_LOG: info,witness=debug,siglog=debug
ports:
- "8081:8080"
volumes:
- witness-data:/data
depends_on:
log:
condition: service_healthy
healthcheck:
test:
interval: 5s
timeout: 3s
retries: 10
# Go witness using litewitness from filippo.io/litetlog
# Currently disabled due to build issues. To enable:
# 1. Uncomment this service
# 2. Add litewitness=http://litewitness:8080 to log's --external-witnesses
# 3. Add depends_on: litewitness to log service
# litewitness:
# build:
# context: .
# dockerfile: Dockerfile.litewitness
# environment:
# LITEWITNESS_PRIVATE_KEY: ${LITEWITNESS_PRIVATE_KEY}
# LITEWITNESS_NAME: local.dev/litewitness
# LITEWITNESS_DB: /data/litewitness.db
# LITEWITNESS_LISTEN: 0.0.0.0:8080
# LOG_ORIGIN: local.dev/log
# LOG_PUBLIC_KEY: ${LOG_PUBLIC_KEY}
# ports:
# - "8083:8080"
# volumes:
# - litewitness-data:/data
# healthcheck:
# test: ["CMD", "nc", "-z", "localhost", "8080"]
# interval: 5s
# timeout: 3s
# retries: 10
# start_period: 15s
monitor:
build:
context: .
dockerfile: Dockerfile.local
command:
- conda-monitor
- --database-url=sqlite:/data/monitor.db?mode=rwc
- --private-key=${MONITOR_PRIVATE_KEY}
- --listen=0.0.0.0:8080
- --log=local.dev/log=${LOG_PUBLIC_KEY}=http://log:8080
environment:
RUST_LOG: info,conda_monitor=debug,siglog=debug
ports:
- "8082:8080"
volumes:
- monitor-data:/data
depends_on:
log:
condition: service_healthy
healthcheck:
test:
interval: 5s
timeout: 3s
retries: 10
volumes:
log-data:
witness-data:
monitor-data:
# litewitness-data: