docker-compose-test.yml raw
1 version: '3.8'
2
3 services:
4 # Dgraph database
5 dgraph:
6 image: dgraph/standalone:latest
7 container_name: orly-dgraph
8 ports:
9 - "8080:8080" # HTTP API
10 - "9080:9080" # gRPC (ORLY connects here)
11 - "8000:8000" # Ratel UI
12 volumes:
13 - dgraph-data:/dgraph
14 environment:
15 - DGRAPH_ALPHA_JAEGER_COLLECTOR=false
16 networks:
17 - orly-network
18 healthcheck:
19 test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
20 interval: 10s
21 timeout: 5s
22 retries: 5
23 start_period: 20s
24
25 # ORLY relay with dgraph backend
26 orly:
27 build:
28 context: ..
29 dockerfile: Dockerfile
30 container_name: orly-relay
31 ports:
32 - "3334:3334" # WebSocket/HTTP
33 depends_on:
34 dgraph:
35 condition: service_healthy
36 environment:
37 # Database configuration
38 - ORLY_DB_TYPE=dgraph
39 - ORLY_DGRAPH_URL=dgraph:9080
40 - ORLY_DATA_DIR=/data
41
42 # Server configuration
43 - ORLY_LISTEN=0.0.0.0
44 - ORLY_PORT=3334
45 - ORLY_LOG_LEVEL=info
46 - ORLY_APP_NAME=ORLY-Dgraph-Test
47
48 # Admin configuration (example)
49 - ORLY_ADMINS=npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku
50 - ORLY_OWNERS=npub1fjqqy4a93z5zsjwsfxqhc2764kvykfdyttvldkkkdera8dr78vhsmmleku
51
52 # ACL mode
53 - ORLY_ACL_MODE=none
54 volumes:
55 - orly-data:/data
56 networks:
57 - orly-network
58 healthcheck:
59 test: ["CMD", "curl", "-f", "http://localhost:3334/"]
60 interval: 10s
61 timeout: 5s
62 retries: 5
63 start_period: 30s
64 restart: unless-stopped
65
66 # Relay tester (optional, for automated testing)
67 relay-tester:
68 build:
69 context: ..
70 dockerfile: Dockerfile.relay-tester
71 container_name: orly-tester
72 depends_on:
73 orly:
74 condition: service_healthy
75 environment:
76 - RELAY_URL=ws://orly:3334
77 networks:
78 - orly-network
79 profiles:
80 - test
81
82 networks:
83 orly-network:
84 driver: bridge
85 ipam:
86 config:
87 - subnet: 172.28.0.0/16
88
89 volumes:
90 dgraph-data:
91 driver: local
92 orly-data:
93 driver: local
94