Skip to content

Commit 2da0e5c

Browse files
committed
fix docker
1 parent 30ff645 commit 2da0e5c

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ services:
33
image: centrifugo/centrifugo:v6.8.0
44
command:
55
- centrifugo
6-
- --config=/centrifugo_test.json
6+
- --config=/centrifugo/config.json
77
ports:
88
- "8000:8000"
99
volumes:
10-
- ./centrifugo_test.json:/centrifugo_test.json:ro
10+
- ./centrifugo_test.json:/centrifugo/config.json:ro
1111
extra_hosts:
1212
- "host.docker.internal:host-gateway"

src/shared_poll.protobuf.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function startMockBackend(): Promise<void> {
5959
});
6060
});
6161
mockServer.on('error', reject);
62-
mockServer.listen(mockBackendPort, '127.0.0.1', () => resolve());
62+
mockServer.listen(mockBackendPort, () => resolve());
6363
});
6464
}
6565

src/shared_poll.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ function startMockBackend(): Promise<void> {
6868
}
6969
});
7070
});
71-
mockServer.listen(mockBackendPort, '127.0.0.1', () => resolve());
71+
// Bind to all interfaces so Centrifugo running inside Docker can reach
72+
// this mock backend via host.docker.internal (which routes through the
73+
// docker0 bridge on Linux, not loopback).
74+
mockServer.listen(mockBackendPort, () => resolve());
7275
});
7376
}
7477

0 commit comments

Comments
 (0)