Skip to content

Commit

Permalink
update README. just commands for docker stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Jan 18, 2024
1 parent e34a474 commit 67d4ea3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 44 deletions.
48 changes: 4 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,39 +47,8 @@ Run front end dev server and Go binary together with `mprocs`
just run-all-dev
```

**Use private key to fund users**

```bash
./eth-faucet -httpport 8080 -wallet.provider http://localhost:8545 -wallet.privkey privkey
```

**Use keystore to fund users**

```bash
./eth-faucet -httpport 8080 -wallet.provider http://localhost:8545 -wallet.keyjson keystore -wallet.keypass password.txt
```

### Configuration

You can configure the funder by using environment variables instead of command-line flags as follows:
```bash
export WEB3_PROVIDER=https://some.rpc.endpoint
export PRIVATE_KEY=0x...
```

or

```bash
export WEB3_PROVIDER=https://some.rpc.endpoint
export KEYSTORE=path/to/keystore
echo "your keystore password" > `pwd`/password.txt
```

Then run the faucet application without the wallet command-line flags:
```bash
./eth-faucet -httpport 8080
```

**Optional Flags**

The following are the available command-line flags(excluding above wallet flags):
Expand All @@ -96,19 +65,10 @@ The following are the available command-line flags(excluding above wallet flags)
### Docker deployment

```bash
docker run -d -p 8080:8080 -e WEB3_PROVIDER=https://some.rpc.endpoint -e PRIVATE_KEY=0x... chainflag/eth-faucet:1.1.0
```

or

```bash
docker run -d -p 8080:8080 -e WEB3_PROVIDER=https://some.rpc.endpoint -e KEYSTORE=path/to/keystore -v `pwd`/keystore:/app/keystore -v `pwd`/password.txt:/app/password.txt chainflag/eth-faucet:1.1.0
```

#### Build the Docker image

```bash
docker buildx build -t ghcr.io/astriaorg/astria-faucet:0.0.1-local .
# might need to build image first
just docker-build
# run via Docker image
just docker-run
```

## License
Expand Down
11 changes: 11 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
default:
@just --list

image_name := 'ghcr.io/astriaorg/eth-faucet'
default_docker_tag := 'local'

# installs developer dependencies for MacOS users with `brew`
brew-install-dev-deps:
brew install just
Expand All @@ -13,6 +16,14 @@ build-all:
go generate -x
go build -v

# builds docker image w/ `local` tag by default
docker-build tag=default_docker_tag:
docker buildx build -f ./Dockerfile -t {{image_name}}:{{tag}} .

# runs faucet via docker
docker-run tag=default_docker_tag:
docker run --rm -p 8080:8080 {{image_name}}:{{tag}}

# lints the go code
go-lint:
golangci-lint run ./...
Expand Down

0 comments on commit 67d4ea3

Please sign in to comment.