-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add .env file to gitignore * feat: allow setting bidder address via environment variable * chore: add env.example file with configuration placeholders * feat: integrate docker setup
- Loading branch information
Showing
7 changed files
with
72 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ mev-commit_0.3.0_Linux_x86_64.tar.gz | |
launchmevcommit | ||
*.swp | ||
**/data/* | ||
.env |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM golang:1.23-alpine AS builder | ||
|
||
WORKDIR /app | ||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -o bidder ./cmd/sendblob.go | ||
|
||
FROM alpine:latest | ||
|
||
|
||
RUN apk --no-cache add curl | ||
RUN apk add --no-cache jq | ||
|
||
COPY --from=builder /app/bidder /app/bidder | ||
COPY --from=builder /app/entrypoint.sh /entrypoint.sh | ||
|
||
RUN chmod +x /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
up-bidder: | ||
@if [ ! -f .env ]; then \ | ||
echo "\033[31mOops! \033[91mLooks like the \033[93m.env \033[91mfile is missing. 😱\n\033[96mPlease ensure the \033[93m.env \033[96mfile exists before running this command.\033[0m"; \ | ||
exit 1; \ | ||
fi; \ | ||
docker compose --profile bidder up --build -d | ||
|
||
down: | ||
@echo "\033[96mShutting down services from default docker compose file...\033[0m" | ||
docker compose --profile bidder down --remove-orphans | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
services: | ||
bidder: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
container_name: bidder | ||
environment: | ||
BIDDER_ADDRESS: 10.0.0.1:13524 | ||
env_file: | ||
- .env | ||
entrypoint: ./entrypoint.sh | ||
profiles: | ||
- bidder | ||
networks: | ||
primev_net: | ||
ipv4_address: 10.0.0.2 | ||
|
||
networks: | ||
primev_net: | ||
ipam: | ||
config: | ||
- subnet: 10.0.0.0/16 |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
/app/bidder \ | ||
--rpc-endpoints ${RPC_ENDPOINTS} \ | ||
--ws-endpoint ${WS_ENDPOINT} \ | ||
--privatekey ${PRIVATE_KEY} \ | ||
--use-payload ${USE_PAYLOAD} | ||
|
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
RPC_ENDPOINTS="http://52.11.201.67:8545/" | ||
WS_ENDPOINT="ws://52.11.201.67:8546/" | ||
PRIVATE_KEY= | ||
USE_PAYLOAD=true |