docker-compose.yml raw
1 # Negentropy (NIP-77) Interop Test Infrastructure
2 #
3 # Tests NIP-77 negentropy sync between:
4 # - strfry (client) <-> ORLY (server)
5 # - ORLY (client) <-> ORLY (server) via orly sync CLI
6 #
7 # Usage (from this directory):
8 # docker compose build
9 # docker compose up -d
10 # ./comprehensive-test.sh
11 # docker compose down -v
12
13 services:
14 # Strfry relay - has native negentropy support and sync command
15 strfry:
16 build:
17 context: .
18 dockerfile: Dockerfile.strfry
19 ports:
20 - "7777:7777"
21 volumes:
22 - strfry-data:/strfry-db
23 - ./strfry.conf:/etc/strfry.conf:ro
24 networks:
25 - negentropy-test
26 healthcheck:
27 test: ["CMD", "curl", "-sf", "http://localhost:7777"]
28 interval: 5s
29 timeout: 5s
30 retries: 10
31 start_period: 10s
32
33 # ORLY relay 1 with embedded negentropy (NIP-77 server)
34 orly-relay-1:
35 build:
36 context: ../..
37 dockerfile: tests/negentropy/Dockerfile.orly
38 ports:
39 - "3334:3334"
40 environment:
41 - ORLY_PORT=3334
42 - ORLY_DATA_DIR=/data
43 - ORLY_LOG_LEVEL=debug
44 - ORLY_NEGENTROPY_ENABLED=true
45 - ORLY_QUERY_RESULT_LIMIT=10000
46 volumes:
47 - orly-data-1:/data
48 networks:
49 - negentropy-test
50 healthcheck:
51 test: ["CMD", "curl", "-sf", "http://localhost:3334"]
52 interval: 5s
53 timeout: 5s
54 retries: 10
55 start_period: 10s
56
57 # ORLY relay 2 with embedded negentropy (for orly<->orly sync testing)
58 orly-relay-2:
59 build:
60 context: ../..
61 dockerfile: tests/negentropy/Dockerfile.orly
62 ports:
63 - "3335:3335"
64 environment:
65 - ORLY_PORT=3335
66 - ORLY_DATA_DIR=/data
67 - ORLY_LOG_LEVEL=debug
68 - ORLY_NEGENTROPY_ENABLED=true
69 - ORLY_QUERY_RESULT_LIMIT=10000
70 volumes:
71 - orly-data-2:/data
72 networks:
73 - negentropy-test
74 healthcheck:
75 test: ["CMD", "curl", "-sf", "http://localhost:3335"]
76 interval: 5s
77 timeout: 5s
78 retries: 10
79 start_period: 10s
80
81 # Test runner with event-generator, orly CLI, and websocat
82 test-runner:
83 build:
84 context: ../..
85 dockerfile: tests/negentropy/Dockerfile.test-runner
86 environment:
87 - STRFRY_URL=ws://strfry:7777
88 - ORLY1_URL=ws://orly-relay-1:3334
89 - ORLY2_URL=ws://orly-relay-2:3335
90 depends_on:
91 strfry:
92 condition: service_healthy
93 orly-relay-1:
94 condition: service_healthy
95 orly-relay-2:
96 condition: service_healthy
97 networks:
98 - negentropy-test
99 command: ["sleep", "infinity"]
100
101 volumes:
102 strfry-data:
103 orly-data-1:
104 orly-data-2:
105
106 networks:
107 negentropy-test:
108 driver: bridge
109