Skip to content

Commit

Permalink
add protocol to faucet address
Browse files Browse the repository at this point in the history
  • Loading branch information
containerman17 authored Aug 20, 2024
1 parent d185353 commit b24045f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/faucet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ func init() {

rpcEndpoint := os.Getenv("RPC_ENDPOINT")
if rpcEndpoint == "" {
rpcEndpoint = "localhost:9650"
rpcEndpoint = "http://localhost:9650"
}
url := fmt.Sprintf("http://%s/ext/bc/morpheusvm", rpcEndpoint)
url := fmt.Sprintf("%s/ext/bc/morpheusvm", rpcEndpoint)
cli = rpc.NewJSONRPCClient(url)

networkID, subnetID, chainID, err := cli.Network(context.TODO())
Expand Down
1 change: 0 additions & 1 deletion deploy/Dockerfile.faucet
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ RUN --mount=type=cache,target=/go/pkg/mod \
#####
FROM debian:bookworm-slim

ENV RPC_ENDPOINT=devnet:9650
COPY --from=faucet-builder /build/build/faucet /faucet

ENTRYPOINT ["/faucet"]
2 changes: 2 additions & 0 deletions deploy/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ services:
context: ../
environment:
- FAUCET_PRIVATE_KEY_HEX=323b1d8f4eed5f0da9da93071b034f2dce9d2d22692c172f3cb252a64ddfafd01b057de320297c29ad0c1f589ea216869cf1938d88c9fbd70d6748323dbf2fa7
- RPC_ENDPOINT=http://devnet:9650
restart: always
ports:
- "127.0.0.1:8765:8765"

# TODO: restore healthcheck
# healthcheck:
# test: ["CMD", "nc", "-z", "localhost", "8765"]
Expand Down
2 changes: 1 addition & 1 deletion deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
fi

if [ -f .env ] && grep -q "SERVE_DOMAIN" .env; then
if [ -n "${SERVE_DOMAIN}" ]; then
docker compose up -d --build # remote, deploy caddy too
else
docker compose up -d --build devnet faucet # local, no reverse proxy
Expand Down

0 comments on commit b24045f

Please sign in to comment.