Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker for apple silicon macs #68

Merged
merged 5 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
validator:
image: validator
platform: "linux/amd64"
build:
context: .
dockerfile: Dockerfile.validator
Expand All @@ -9,6 +10,7 @@ services:

bridge:
image: bridge
platform: "linux/amd64"
build:
context: .
dockerfile: Dockerfile.bridge
Expand Down
9 changes: 7 additions & 2 deletions tools/gen_auth_tokens.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ write_token() {
local auth_level="$1"
local token="$2"

local var_name="CELESTIA_NODE_AUTH_TOKEN_${auth_level^^}"
auth_level="$(echo "$auth_level" | tr '[:lower:]' '[:upper:]')"

sed -i "s/.*$var_name.*/$var_name=$token/" "$DOTENV"
local var_name="CELESTIA_NODE_AUTH_TOKEN_${auth_level}"

sed -i.bak "s/.*$var_name.*/$var_name=$token/" "$DOTENV"
# there's no compatible way to tell sed not to do a backup file
# accept it and remove the file afterwards
rm "$DOTENV.bak"
}

main() {
Expand Down
Loading