-
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.
- Loading branch information
0 parents
commit 0638d71
Showing
9 changed files
with
218 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: docker-build-and-push | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and Push to DockerHub | ||
id: docker_build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
tags: kryptokrauts/leap:${{github.ref_name}} |
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,25 @@ | ||
FROM ubuntu:22.04 AS builder | ||
|
||
RUN apt-get update && apt-get -y install wget | ||
RUN wget https://github.com/AntelopeIO/leap/releases/download/v4.0.4/leap_4.0.4-ubuntu22.04_amd64.deb | ||
RUN apt install -y ./leap_4.0.4-ubuntu22.04_amd64.deb | ||
|
||
FROM ubuntu:22.04 AS runner | ||
|
||
COPY --from=builder /usr/bin /usr/bin | ||
|
||
RUN adduser --disabled-password leap && \ | ||
mkdir -p /opt/leap && \ | ||
chown -R leap:leap /opt | ||
|
||
WORKDIR /opt/leap | ||
USER leap | ||
|
||
COPY start.sh /opt/leap/start.sh | ||
|
||
ENTRYPOINT [\ | ||
"/opt/leap/start.sh",\ | ||
"--data-dir", "/opt/leap/data",\ | ||
"--config-dir", "/opt/leap/config",\ | ||
"--genesis-json", "/opt/leap/config/genesis.json"\ | ||
] |
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 @@ | ||
# leap-image-builder | ||
|
||
This repository includes a Github action that builds a docker image for [Antelope Leap](https://github.com/AntelopeIO/leap). | ||
|
||
The images are published on DockerHub: | ||
- https://hub.docker.com/repository/docker/kryptokrauts/leap | ||
|
||
## Example usage | ||
|
||
The provided [`docker-compose.yaml`](./example-usage/docker-compose.yaml) showcases how the docker image can be used to run a node on the [XPR Network](https://xprnetwork.org) that has the [`state-history-plugin`](https://github.com/AntelopeIO/leap/blob/main/docs/01_nodeos/03_plugins/state_history_plugin/index.md) enabled. | ||
|
||
Note: You can use the [`.cleanup.sh`](./example-usage/cleanup.sh) script to easily remove all the chain relevant files that will be added when running the node. |
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,2 @@ | ||
rm -rf xpr-mainnet/data/* | ||
rm -rf xpr-mainnet/config/protocol_features |
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,13 @@ | ||
services: | ||
leap: | ||
build: | ||
context: ../ | ||
dockerfile: Dockerfile | ||
container_name: leap | ||
command: | ||
- "--disable-replay-opts" | ||
volumes: | ||
- ./xpr-mainnet/config:/opt/leap/config | ||
- ./xpr-mainnet/data:/opt/leap/data | ||
ports: | ||
- "8888:8888" |
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 @@ | ||
data/* |
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,102 @@ | ||
http-server-address = 0.0.0.0:8888 | ||
p2p-listen-endpoint = 0.0.0.0:9876 | ||
p2p-server-address = DOMAIN_OR_IP:9876 | ||
|
||
enable-account-queries = true | ||
|
||
chain-state-db-size-mb = 8192 | ||
|
||
contracts-console = true | ||
|
||
p2p-max-nodes-per-host = 100 | ||
|
||
chain-threads = 8 | ||
http-threads = 6 | ||
#wasm-runtime = wabt | ||
http-validate-host = false | ||
verbose-http-errors = true | ||
abi-serializer-max-time-ms = 2000 | ||
|
||
#produce-time-offset-us = 250000 | ||
last-block-time-offset-us = -300000 | ||
# eosio2.0 | ||
http-max-response-time-ms = 100 | ||
#Only!! for performance eosio 2.0+ | ||
#eos-vm-oc-compile-threads = 4 | ||
#eos-vm-oc-enable = 1 | ||
wasm-runtime = eos-vm-jit | ||
#END | ||
|
||
|
||
# Safely shut down node when free space | ||
chain-state-db-guard-size-mb = 128 | ||
#reversible-blocks-db-guard-size-mb = 2 | ||
|
||
|
||
access-control-allow-origin = * | ||
access-control-allow-headers = Origin, X-Requested-With, Content-Type, Accept | ||
# access-control-allow-headers = | ||
# access-control-max-age = | ||
# access-control-allow-credentials = false | ||
|
||
|
||
# actor-whitelist = | ||
# actor-blacklist = | ||
# contract-whitelist = | ||
# contract-blacklist = | ||
# filter-on = | ||
|
||
|
||
# SSL | ||
# Filename with https private key in PEM format. Required for https (eosio::http_plugin) | ||
# https-server-address = | ||
# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin) | ||
# https-certificate-chain-file = | ||
# Filename with https private key in PEM format. Required for https (eosio::http_plugin) | ||
# https-private-key-file = | ||
|
||
########################################################################### | ||
# State History (For 1.8.0-rc1+ add to start params --disable-replay-opts ) | ||
plugin = eosio::state_history_plugin | ||
state-history-dir = state-history | ||
trace-history = true | ||
chain-state-history = true | ||
state-history-endpoint = 0.0.0.0:8080 | ||
# debug mode info (https://github.com/EOSIO/eos/pull/7298) | ||
# #trace-history-debug-mode | ||
############################################################################ | ||
|
||
allowed-connection = any | ||
|
||
# allowed-connection = specified | ||
# peer-private-key = ["!!NEW_KEY_PUB!!","!!NEW_KEY_PRIV!!"] #create new key for private peers | ||
# peer-key = "!![PUBKEY]!!" | ||
|
||
|
||
max-clients = 100 | ||
connection-cleanup-period = 30 | ||
sync-fetch-span = 2000 | ||
enable-stale-production = false | ||
|
||
|
||
pause-on-startup = false | ||
max-irreversible-block-age = -1 | ||
#txn-reference-block-lag = 0 | ||
|
||
# peer-key = | ||
# peer-private-key = | ||
plugin = eosio::http_plugin | ||
plugin = eosio::producer_plugin | ||
#plugin = eosio::producer_api_plugin | ||
plugin = eosio::chain_plugin | ||
plugin = eosio::chain_api_plugin | ||
|
||
#p2p-peer-address = | ||
p2p-peer-address = api.protonnz.com:9876 | ||
p2p-peer-address = proton.protonuk.io:9876 | ||
p2p-peer-address = proton.p2p.eosusa.io:9879 | ||
p2p-peer-address = protonp2p.eoscafeblock.com:9130 | ||
p2p-peer-address = p2p.alvosec.com:9876 | ||
p2p-peer-address = mainnet.brotonbp.com:9876 | ||
p2p-peer-address = proton.eu.eosamsterdam.net:9103 | ||
p2p-peer-address = proton.genereos.io:9876 |
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,24 @@ | ||
{ | ||
"initial_timestamp": "2020-04-22T17:00:00", | ||
"initial_key": "EOS5XPRJt1zUiLH98rtDLj9TnPi52DLQ7gTZbkRvBGJXLv6ak6Cdq", | ||
"initial_configuration": { | ||
"max_block_net_usage": 1048576, | ||
"target_block_net_usage_pct": 1000, | ||
"max_transaction_net_usage": 524288, | ||
"base_per_transaction_net_usage": 12, | ||
"net_usage_leeway": 500, | ||
"context_free_discount_net_usage_num": 20, | ||
"context_free_discount_net_usage_den": 100, | ||
"max_block_cpu_usage": 200000, | ||
"target_block_cpu_usage_pct": 2500, | ||
"max_transaction_cpu_usage": 150000, | ||
"min_transaction_cpu_usage": 100, | ||
"max_transaction_lifetime": 3600, | ||
"deferred_trx_expiration_window": 600, | ||
"max_transaction_delay": 3888000, | ||
"max_inline_action_size": 4096, | ||
"max_inline_action_depth": 6, | ||
"max_authority_depth": 6, | ||
"max_ram_size": 34359738368 | ||
} | ||
} |
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,10 @@ | ||
#!/bin/bash | ||
|
||
NODEOSBINDIR="/usr/bin" | ||
|
||
echo -e "Starting Nodeos \n"; | ||
|
||
ulimit -n 65535 | ||
ulimit -s 64000 | ||
|
||
$NODEOSBINDIR/nodeos "$@" |