YAML · 2606 bytes Raw Blame History
1 version: '3.8'
2
3 # Test configuration with faster startup and more logging
4 services:
5 coordinator:
6 build:
7 context: ../../zephyrfs-coordinator
8 dockerfile: Dockerfile
9 container_name: zephyrfs-coordinator-test
10 ports:
11 - "19090:9090"
12 environment:
13 - LOG_LEVEL=debug
14 - LISTEN_PORT=9090
15 - DATA_DIR=/var/lib/zephyrfs
16 - TEST_MODE=true
17 networks:
18 - zephyrfs-test
19 healthcheck:
20 test: ["CMD", "./coordinator", "--health-check"]
21 interval: 10s
22 timeout: 5s
23 retries: 2
24 start_period: 20s
25
26 node1:
27 build:
28 context: ../../zephyrfs-node
29 dockerfile: Dockerfile
30 container_name: zephyrfs-node1-test
31 ports:
32 - "14001:4001"
33 - "18081:8080"
34 environment:
35 - LOG_LEVEL=debug
36 - P2P_PORT=4001
37 - API_PORT=8080
38 - COORDINATOR_URL=http://coordinator:9090
39 - NODE_ID=test-node1
40 - STORAGE_QUOTA=1GB
41 - TEST_MODE=true
42 networks:
43 - zephyrfs-test
44 depends_on:
45 coordinator:
46 condition: service_healthy
47 healthcheck:
48 test: ["CMD", "zephyrfs-node", "--health-check"]
49 interval: 10s
50 timeout: 5s
51 retries: 2
52 start_period: 20s
53
54 node2:
55 build:
56 context: ../../zephyrfs-node
57 dockerfile: Dockerfile
58 container_name: zephyrfs-node2-test
59 ports:
60 - "14002:4001"
61 - "18082:8080"
62 environment:
63 - LOG_LEVEL=debug
64 - P2P_PORT=4001
65 - API_PORT=8080
66 - COORDINATOR_URL=http://coordinator:9090
67 - NODE_ID=test-node2
68 - STORAGE_QUOTA=1GB
69 - TEST_MODE=true
70 networks:
71 - zephyrfs-test
72 depends_on:
73 coordinator:
74 condition: service_healthy
75 healthcheck:
76 test: ["CMD", "zephyrfs-node", "--health-check"]
77 interval: 10s
78 timeout: 5s
79 retries: 2
80 start_period: 20s
81
82 node3:
83 build:
84 context: ../../zephyrfs-node
85 dockerfile: Dockerfile
86 container_name: zephyrfs-node3-test
87 ports:
88 - "14003:4001"
89 - "18083:8080"
90 environment:
91 - LOG_LEVEL=debug
92 - P2P_PORT=4001
93 - API_PORT=8080
94 - COORDINATOR_URL=http://coordinator:9090
95 - NODE_ID=test-node3
96 - STORAGE_QUOTA=1GB
97 - TEST_MODE=true
98 networks:
99 - zephyrfs-test
100 depends_on:
101 coordinator:
102 condition: service_healthy
103 healthcheck:
104 test: ["CMD", "zephyrfs-node", "--health-check"]
105 interval: 10s
106 timeout: 5s
107 retries: 2
108 start_period: 20s
109
110 networks:
111 zephyrfs-test:
112 driver: bridge
113 ipam:
114 config:
115 - subnet: 172.21.0.0/16