diff --git a/Makefile b/Makefile index 47a1702c7..173b2e3f2 100644 --- a/Makefile +++ b/Makefile @@ -321,7 +321,7 @@ start-caddy: @echo "(start-caddy) Starting caddy" ./build/caddy run --config ./config/caddy/Caddyfile -start-proxy: +start-motr: motr @echo "(start-proxy) Starting proxy server" ./build/motr proxy diff --git a/chains.yaml b/chains.yaml index 262c9b928..e8bf09694 100644 --- a/chains.yaml +++ b/chains.yaml @@ -4,7 +4,7 @@ # Sonr Node - Identity - name: sonr github-organization: onsonr - github-repo: core + github-repo: sonr dockerfile: cosmos build-target: make install binaries: diff --git a/cmd/motr/proxy.go b/cmd/motr/proxy.go index 232387771..718397ff9 100644 --- a/cmd/motr/proxy.go +++ b/cmd/motr/proxy.go @@ -43,7 +43,7 @@ func NewProxyCmd() *cobra.Command { // Wait for interrupt signal to gracefully shutdown the server with a timeout of 10 seconds. <-ctx.Done() - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() // Shutdown the server with 10 seconds timeout. diff --git a/devbox.json b/devbox.json index c0fefb9cb..61e62a9b2 100644 --- a/devbox.json +++ b/devbox.json @@ -8,7 +8,14 @@ "cloudflared@latest" ], "env": { - "CLOUDFLARE_TUNNEL_TOKEN": "$(skate get CLOUDFLARE_TUNNEL_TOKEN)", + "ACC0_ADDRESS": "idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y", + "ACC0_MNEMONIC": "$(skate get ACC0_MNEMONIC)", + "ACC0_NAME": "acc0", + "ACC1_ADDRESS": "idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd", + "ACC1_MNEMONIC": "$(skate get ACC1_MNEMONIC)", + "ACC1_NAME": "acc1", + "BINARY": "sonrd", + "TUNNEL_TOKEN": "$(skate get CLOUDFLARE_TUNNEL_TOKEN)", "GOPATH": "$HOME/go", "PATH": "$HOME/go/bin:$PATH", "TEMPL_EXPERIMENT": "rawgo", @@ -19,40 +26,17 @@ }, "shell": { "scripts": { - "install": [ - "make install", - "bun --cwd nebula run fetch:deps" - ], - "build:docker": [ - "make local-image" - ], - "build:dwn": [ - "make dwn" - ], - "build:motr": [ - "make motr" - ], - "build:nebula": [ - "bun --cwd nebula run build" - ], - "build:sonrd": [ - "make build" - ], - "gen:proto": [ - "make proto-gen" - ], - "gen:pkl": [ - "make pkl" - ], - "gen:templ": [ - "make templ" - ], - "start:tunnel": [ - "cloudflared tunnel run --token $(skate get CLOUDFLARE_TUNNEL_TOKEN)" - ], - "watch:nebula": [ - "bun --cwd nebula run watch" - ] + "install": ["make install"], + "build:docker": ["make local-image"], + "build:dwn": ["make dwn"], + "build:motr": ["make motr"], + "build:nebula": ["bun --cwd nebula run build"], + "build:sonrd": ["make build"], + "gen:proto": ["make proto-gen"], + "gen:pkl": ["make pkl"], + "gen:templ": ["make templ"], + "start:motr": ["make start-motr"], + "watch:nebula": ["bun --cwd nebula run watch"] } } } diff --git a/process-compose.yaml b/process-compose.yaml index 9fd974150..5e80c4b1c 100644 --- a/process-compose.yaml +++ b/process-compose.yaml @@ -3,7 +3,7 @@ version: "0.6" processes: ipfs: namespace: testnet - command: "sh scripts/bootstrap_ipfs.sh" + command: "sh scripts/setup_ipfs.sh" background: true availability: restart: on_failure @@ -17,9 +17,18 @@ processes: depends: - ipfs + motr: + namespace: testnet + command: "make start-motr" + restart: on_failure + max_restarts: 1 + depends: + - ipfs + - sonr + tunnel: namespace: public - command: "devbox run start:tunnel" + command: "cloudflared tunnel run --token $TUNNEL_TOKEN" restart: on_failure max_restarts: 1 depends: diff --git a/scripts/init_env.sh b/scripts/init_env.sh new file mode 100644 index 000000000..eb6138fee --- /dev/null +++ b/scripts/init_env.sh @@ -0,0 +1,8 @@ +#!/bin/zsh + +export ACC0_MNEMONIC=$(skate get ACC0_MNEMONIC) +export ACC1_MNEMONIC=$(skate get ACC1_MNEMONIC) +export CHAIN_ID=$(skate get CHAIN_ID) +export DENOM=$(skate get DENOM) +export KEYRING=$(skate get KEYRING) +export MONIKER=$(skate get MONIKER) diff --git a/scripts/bootstrap_ipfs.sh b/scripts/setup_ipfs.sh similarity index 100% rename from scripts/bootstrap_ipfs.sh rename to scripts/setup_ipfs.sh diff --git a/scripts/build_xcaddy.sh b/scripts/setup_xcaddy.sh similarity index 100% rename from scripts/build_xcaddy.sh rename to scripts/setup_xcaddy.sh diff --git a/scripts/test_node.sh b/scripts/test_node.sh index 45ad8f58c..c38151c0d 100644 --- a/scripts/test_node.sh +++ b/scripts/test_node.sh @@ -65,9 +65,9 @@ from_scratch () { } # idx1efd63aw40lxf3n4mhf7dzhjkr453axur9vjt6y - add_key $KEY "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" + add_key $KEY "$ACC0_MNEMONIC" # idx1hj5fveer5cjtn4wd6wstzugjfdxzl0xpecp0nd - add_key $KEY2 "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise" + add_key $KEY2 "$ACC1_MNEMONIC" # chain initial setup BINARY init $MONIKER --chain-id $CHAIN_ID --default-denom $DENOM