|
| 1 | +# ============================================================================ |
| 2 | +# Dockermint Recipe - Kyve (Kyved) |
| 3 | +# ============================================================================ |
| 4 | +# Dockermint is a CD pipeline for building standardized Docker images |
| 5 | +# of Cosmos SDK blockchain nodes. |
| 6 | +# |
| 7 | +# Variables syntax: |
| 8 | +# {{UPPERCASE}} # Defined by Dockermint from the host |
| 9 | +# {{lowercase}} # Defined dynamically during compilation |
| 10 | +# shell = "" # Shell execution with output capture |
| 11 | +# ============================================================================ |
| 12 | + |
| 13 | +[meta] |
| 14 | +schema_version = 1 |
| 15 | +min_dockermint_version = "0.1.0" |
| 16 | + |
| 17 | +[header] |
| 18 | +name = "Kyve" |
| 19 | +repo = "https://github.com/KYVENetwork/chain" |
| 20 | +type = "golang" |
| 21 | +binary_name = "kyved" |
| 22 | +include_patterns = "" |
| 23 | +exclude_patterns = "" |
| 24 | + |
| 25 | +# ============================================================================ |
| 26 | +# Available and default flavours |
| 27 | +# ============================================================================ |
| 28 | + |
| 29 | +[flavours.available] |
| 30 | +architecture = ["x86_64", "aarch64"] |
| 31 | +db_backend = ["goleveldb", "pebbledb"] |
| 32 | +binary_type = ["dynamic", "static"] |
| 33 | +running_env = ["alpine3.23", "bookworm", "distroless"] |
| 34 | +running_user = ["root", "custom", "dockermint"] |
| 35 | +build_tags = ["netgo", "ledger", "muslc"] |
| 36 | +network = ["mainnet", "kaon"] |
| 37 | + |
| 38 | +[flavours.default] |
| 39 | +architecture = "{{HOST_ARCH}}" |
| 40 | +db_backend = "goleveldb" |
| 41 | +binary_type = "static" |
| 42 | +running_env = "alpine3.23" |
| 43 | +running_user = "root" |
| 44 | +build_tags = ["netgo", "muslc"] |
| 45 | +network = "mainnet" |
| 46 | + |
| 47 | +# ============================================================================ |
| 48 | +# Scrapper |
| 49 | +# ============================================================================ |
| 50 | + |
| 51 | +[scrapper] |
| 52 | +image = "golang:1.23-alpine3.21" |
| 53 | +install = "apk add --no-cache git" |
| 54 | +env = ["{{GH_USER}}", "{{GH_PAT}}"] |
| 55 | +method = "try-authenticated-clone" |
| 56 | +directory = "{{repository_path}}" |
| 57 | + |
| 58 | +# ============================================================================ |
| 59 | +# Build variables |
| 60 | +# ============================================================================ |
| 61 | + |
| 62 | +[variables] |
| 63 | +repo_commit = { shell = "git log -1 --format='%H'" } |
| 64 | +repo_version = { shell = "git describe --exact-match 2>/dev/null || echo \"$(git rev-parse --abbrev-ref HEAD)-$(git log -1 --format='%H')\"" } |
| 65 | +golang_version = { shell = "grep -E '^(toolchain|go) ' go.mod | head -1 | sed 's/^toolchain go//;s/^go //'" } |
| 66 | +cometbft_version = { shell = "go list -m github.com/cometbft/cometbft | sed 's:.* ::'" } |
| 67 | +cometbft_db_version = { shell = "go list -m github.com/cometbft/cometbft-db 2>/dev/null | sed 's:.* ::'" } |
| 68 | +cosmos_db_version = { shell = "go list -m github.com/cosmos/cosmos-db 2>/dev/null | sed 's:.* ::'" } |
| 69 | + |
| 70 | +# ============================================================================ |
| 71 | +# Profiles |
| 72 | +# ============================================================================ |
| 73 | + |
| 74 | +[profiles.network.mainnet] |
| 75 | +denom = "ukyve" |
| 76 | +team_tge = "2023-03-14T14:03:14" |
| 77 | +team_foundation_address = "kyve1xjpl57p7f49y5gueu7rlfytaw9ramcn5zhjy2g" |
| 78 | +team_bcp_address = "kyve1fnh4kghr25tppskap50zk5j385pt65tyyjaraa" |
| 79 | +team_allocation = "165000000000000" |
| 80 | + |
| 81 | +[profiles.network.kaon] |
| 82 | +denom = "tkyve" |
| 83 | +team_tge = "2023-02-07T14:00:00" |
| 84 | +team_foundation_address = "kyve1vut528et85755xsncjwl6dx8xakuv26hxgyv0n" |
| 85 | +team_bcp_address = "kyve1vut528et85755xsncjwl6dx8xakuv26hxgyv0n" |
| 86 | +team_allocation = "165000000000000" |
| 87 | + |
| 88 | +# ============================================================================ |
| 89 | +# Builder |
| 90 | +# ============================================================================ |
| 91 | + |
| 92 | +[builder.install] |
| 93 | +alpine = "apk add --no-cache alpine-sdk linux-headers" |
| 94 | +ubuntu = "apt-get update && apt-get install -y --no-install-recommends make gcc build-essential linux-headers-generic" |
| 95 | + |
| 96 | +# ============================================================================ |
| 97 | +# Build environment |
| 98 | +# ============================================================================ |
| 99 | + |
| 100 | +[build.env] |
| 101 | +CGO_ENABLED = "1" |
| 102 | + |
| 103 | +# ============================================================================ |
| 104 | +# Go linker configuration |
| 105 | +# ============================================================================ |
| 106 | + |
| 107 | +[build.linker.flags] |
| 108 | +dynamic = "-w -s -extldflags '-z noexecstack'" |
| 109 | +static = "-linkmode=external -w -s -extldflags '-Wl,-z,muldefs -static -z noexecstack'" |
| 110 | + |
| 111 | +[build.linker.variables] |
| 112 | +"github.com/cosmos/cosmos-sdk/version.Name" = "kyve" |
| 113 | +"github.com/cosmos/cosmos-sdk/version.AppName" = "{{binary_name}}" |
| 114 | +"github.com/cosmos/cosmos-sdk/version.Version" = "{{repo_version}}" |
| 115 | +"github.com/cosmos/cosmos-sdk/version.Commit" = "{{repo_commit}}" |
| 116 | +"github.com/cosmos/cosmos-sdk/version.BuildTags" = "{{BUILD_TAGS_COMMA_SEP}}" |
| 117 | +"github.com/cometbft/cometbft/version.TMCoreSemVer" = "{{cometbft_version}}" |
| 118 | +"github.com/cosmos/cosmos-sdk/types.DBBackend" = "{{db_backend}}" |
| 119 | +"github.com/KYVENetwork/chain/x/global/types.Denom" = "{{denom}}" |
| 120 | +"github.com/KYVENetwork/chain/x/team/types.TEAM_FOUNDATION_STRING" = "{{team_foundation_address}}" |
| 121 | +"github.com/KYVENetwork/chain/x/team/types.TEAM_BCP_STRING" = "{{team_bcp_address}}" |
| 122 | +"github.com/KYVENetwork/chain/x/team/types.TEAM_ALLOCATION_STRING" = "{{team_allocation}}" |
| 123 | +"github.com/KYVENetwork/chain/x/team/types.TGE_STRING" = "{{team_tge}}" |
| 124 | + |
| 125 | +# ============================================================================ |
| 126 | +# Builder other parameters |
| 127 | +# ============================================================================ |
| 128 | + |
| 129 | +[build.path] |
| 130 | +path = "{{repository_path}}/cmd/kyved" |
| 131 | + |
| 132 | +# ============================================================================ |
| 133 | +# Dockermint user configuration (when running_user == "dockermint") |
| 134 | +# ============================================================================ |
| 135 | + |
| 136 | +[user.dockermint] |
| 137 | +username = "dockermint" |
| 138 | +uid = 10000 |
| 139 | +gid = 10000 |
| 140 | + |
| 141 | +# ============================================================================ |
| 142 | +# Files to copy from builder to runner |
| 143 | +# ============================================================================ |
| 144 | + |
| 145 | +[copy] |
| 146 | +"/go/bin/kyved" = { dest = "/usr/bin/{{binary_name}}", type = "entrypoint" } |
| 147 | + |
| 148 | +# ============================================================================ |
| 149 | +# Default exposed ports |
| 150 | +# ============================================================================ |
| 151 | + |
| 152 | +[expose] |
| 153 | +ports = [ |
| 154 | + { port = 26656, description = "P2P" }, |
| 155 | + { port = 26657, description = "RPC" }, |
| 156 | + { port = 26660, description = "Prometheus metrics" }, |
| 157 | + { port = 1317, description = "REST API" }, |
| 158 | + { port = 9090, description = "gRPC" }, |
| 159 | + { port = 9091, description = "gRPC-Web" }, |
| 160 | +] |
| 161 | + |
| 162 | +# ============================================================================ |
| 163 | +# OCI Labels |
| 164 | +# ============================================================================ |
| 165 | + |
| 166 | +[labels] |
| 167 | +"org.opencontainers.image.created" = "{{CREATION_TIMESTAMP}}" |
| 168 | +"org.opencontainers.image.authors" = "Dockermint CD" |
| 169 | +"org.opencontainers.image.url" = "https://github.com/kyve-network/kyve" |
| 170 | +"org.opencontainers.image.documentation" = "https://docs.kyve.network" |
| 171 | +"org.opencontainers.image.source" = "https://github.com/kyve-network/kyve" |
| 172 | +"org.opencontainers.image.version" = "{{repo_version}}" |
| 173 | +"org.opencontainers.image.revision" = "{{repo_commit}}" |
| 174 | +"org.opencontainers.image.vendor" = "KYVE Foundation" |
| 175 | +"org.opencontainers.image.licenses" = "MIT" |
| 176 | +"org.opencontainers.image.title" = "Kyved" |
| 177 | +"org.opencontainers.image.description" = "Kyve Chain Node" |
| 178 | + |
| 179 | +# ============================================================================ |
| 180 | +# Docker image tag |
| 181 | +# ============================================================================ |
| 182 | + |
| 183 | +[image] |
| 184 | +tag = "kyve-kyved-{{network}}-{{db_backend}}:{{SEMVER_TAG}}-{{running_env}}" |
0 commit comments