Skip to content

Commit

Permalink
Wait for redis to be online
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Sep 19, 2023
1 parent e084d6d commit d3c4a16
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions hole-punch-interop/src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ function buildSpec(containerImages: { [key: string]: () => string }, {
# Wait for router to be online
while ! ping -c 1 -w 1 "${actor}_router"; do sleep 1; done
# Wait for redis to be online
while ! ping -c 1 -w 1 "redis"; do sleep 1; done
ROUTER_IP=$$(dig +short ${actor}_router)
INTERNET_SUBNET=$$(curl --silent --unix-socket /var/run/docker.sock http://localhost/networks/${internetNetworkName} | jq -r '.IPAM.Config[0].Subnet')
Expand Down Expand Up @@ -144,7 +147,8 @@ function buildSpec(containerImages: { [key: string]: () => string }, {
command: ["/bin/sh", "-c", startupScriptFn("alice")],
environment: {
TRANSPORT: transport,
MODE: "dial"
MODE: "dial",
RUST_LOG: "debug"
},
networks: {
alice_lan: {},
Expand All @@ -171,7 +175,8 @@ function buildSpec(containerImages: { [key: string]: () => string }, {
command: ["/bin/sh", "-c", startupScriptFn("bob")],
environment: {
TRANSPORT: transport,
MODE: "listen"
MODE: "listen",
RUST_LOG: "debug"
},
networks: {
bob_lan: {},
Expand Down

0 comments on commit d3c4a16

Please sign in to comment.