Skip to content
Open
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
48 changes: 48 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,51 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

docker-build-local:
name: Build and Publish Docker local image
runs-on: ubuntu-latest
needs: docker-build
if: github.event_name != 'pull_request'
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit

- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0

- name: Log in to GitHub Container Registry
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-local
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha

- name: Build and push Docker local image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: Dockerfile.local
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
43 changes: 43 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ARG BASE_IMAGE=ghcr.io/flashbots/tips:master
FROM ${BASE_IMAGE}

ENV TIPS_INGRESS_ADDRESS=0.0.0.0
ENV TIPS_INGRESS_PORT=8080
ENV TIPS_INGRESS_RPC_MEMPOOL=http://localhost:2222
ENV TIPS_INGRESS_TX_SUBMISSION_METHOD=mempool
ENV TIPS_INGRESS_KAFKA_INGRESS_PROPERTIES_FILE=/app/docker/ingress-bundles-kafka-properties
ENV TIPS_INGRESS_KAFKA_INGRESS_TOPIC=tips-ingress
ENV TIPS_INGRESS_KAFKA_AUDIT_PROPERTIES_FILE=/app/docker/ingress-audit-kafka-properties
ENV TIPS_INGRESS_KAFKA_AUDIT_TOPIC=tips-audit
ENV TIPS_INGRESS_KAFKA_USER_OPERATION_CONSUMER_PROPERTIES_FILE=/app/docker/ingress-user-operation-consumer-kafka-properties
ENV TIPS_INGRESS_LOG_LEVEL=info
ENV TIPS_INGRESS_LOG_FORMAT=pretty
ENV TIPS_INGRESS_SEND_TRANSACTION_DEFAULT_LIFETIME_SECONDS=10800
ENV TIPS_INGRESS_RPC_SIMULATION=http://localhost:8549
ENV TIPS_INGRESS_METRICS_ADDR=0.0.0.0:9002
ENV TIPS_INGRESS_HEALTH_CHECK_ADDR=0.0.0.0:8081
ENV TIPS_INGRESS_BLOCK_TIME_MILLISECONDS=2000
ENV TIPS_INGRESS_METER_BUNDLE_TIMEOUT_MS=2000
ENV TIPS_INGRESS_MAX_BUFFERED_METER_BUNDLE_RESPONSES=100
ENV TIPS_INGRESS_BUILDER_RPCS=http://localhost:2222,http://localhost:2222,http://localhost:2222
ENV TIPS_INGRESS_BACKRUN_ENABLED=true

ENV TIPS_AUDIT_KAFKA_PROPERTIES_FILE=/app/docker/audit-kafka-properties
ENV TIPS_AUDIT_KAFKA_TOPIC=tips-audit
ENV TIPS_AUDIT_LOG_LEVEL=info
ENV TIPS_AUDIT_LOG_FORMAT=pretty
ENV TIPS_AUDIT_S3_BUCKET=tips
ENV TIPS_AUDIT_S3_CONFIG_TYPE=manual
ENV TIPS_AUDIT_S3_ENDPOINT=http://localhost:7000
ENV TIPS_AUDIT_S3_REGION=us-east-1
ENV TIPS_AUDIT_S3_ACCESS_KEY_ID=minioadmin
ENV TIPS_AUDIT_S3_SECRET_ACCESS_KEY=minioadmin

ENV NEXT_PUBLIC_BLOCK_EXPLORER_URL=https://base.blockscout.com
ENV TIPS_UI_RPC_URL=http://localhost:8549
ENV TIPS_UI_AWS_REGION=us-east-1
ENV TIPS_UI_S3_BUCKET_NAME=tips
ENV TIPS_UI_S3_CONFIG_TYPE=manual
ENV TIPS_UI_S3_ENDPOINT=http://localhost:7000
ENV TIPS_UI_S3_ACCESS_KEY_ID=minioadmin
ENV TIPS_UI_S3_SECRET_ACCESS_KEY=minioadmin