-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (48 loc) · 1.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
50 lines (48 loc) · 1.54 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
# Local c2c relay for testing. See .collab/runbooks/local-relay.md.
#
# Quick start:
# DOCKER_BUILDKIT=1 docker compose up -d --build
# curl http://localhost:7331/health
# docker compose logs -f relay
# docker compose down
#
# Iterating on OCaml code:
# DOCKER_BUILDKIT=1 docker compose up --build relay
# (Builder stage caches opam deps via BuildKit cache mount; source-only
# changes rebuild in seconds.)
#
# Data persists in the named volume `c2c-relay-data`. To reset:
# docker compose down -v
services:
relay:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_DATE: local
image: c2c-relay:local
container_name: c2c-relay-local
environment:
# Dev mode (no token). Set RELAY_TOKEN to test prod-mode Bearer auth.
# RELAY_TOKEN: "local-dev-token"
C2C_RELAY_PERSIST_DIR: /var/lib/c2c
PORT: "7331"
# B115: unsigned /poll_inbox and /peek_inbox fail closed by default
# even on a tokenless relay. This explicit development-only gate
# re-opens them for local identity-less testing (loopback bind only).
C2C_RELAY_ALLOW_UNSIGNED_INBOX: "1"
ports:
- "127.0.0.1:7331:7331"
volumes:
- c2c-relay-data:/var/lib/c2c
healthcheck:
test: ["CMD", "sh", "-c", "wget -qO- http://127.0.0.1:7331/health | grep -q ok"]
interval: 10s
timeout: 3s
retries: 3
start_period: 5s
restart: unless-stopped
volumes:
c2c-relay-data:
# Persists leases, nonces, dedup, rooms across restarts.
# `docker compose down -v` wipes it.