-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sets PRIVATE_NETWORK_IP properly under MacOS
- Loading branch information
1 parent
8166cec
commit 219b519
Showing
6 changed files
with
52 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
#!/bin/bash | ||
basedir=$(dirname "$0")/.. | ||
|
||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
IP_ADDR=$(ifconfig -l | xargs -n1 ipconfig getifaddr) | ||
IP_ADDR=$(hostname -i | cut -f1) | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
IP_ADDR=$(ip route get 1 | awk '{print $NF;exit}') | ||
IP_ADDR=$(ipconfig getifaddr en1) | ||
if [[ -z "$IP_ADDR" ]]; then | ||
IP_ADDR=$(ipconfig getifaddr en0) | ||
fi | ||
fi | ||
PRIVATE_NETWORK_IP=${ADDR} mutagen-compose -f "$basedir"/docker-compose.yml down | ||
PRIVATE_NETWORK_IP=${IP_ADDR} mutagen-compose -f "$basedir"/docker-compose.yml down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,16 @@ | ||
#!/bin/bash | ||
basedir=$(readlink -f "$(dirname "$0")"/..) | ||
|
||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then | ||
IP_ADDR=$(hostname -i | cut -f1) | ||
elif [[ "$OSTYPE" == "darwin"* ]]; then | ||
IP_ADDR=$(ipconfig getifaddr en1) | ||
if [[ -z "$IP_ADDR" ]]; then | ||
IP_ADDR=$(ipconfig getifaddr en0) | ||
fi | ||
fi | ||
export PRIVATE_NETWORK_IP=$IP_ADDR | ||
|
||
mutagen-compose -f "$basedir"/docker-compose.yml down --volumes --rmi local && | ||
rm -rf "$basedir"/services/reticulum/deps && | ||
"$basedir"/bin/init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: "3.9" | ||
services: | ||
db: | ||
environment: | ||
|