mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
feat: move taskfile to root
This commit is contained in:
parent
7402ced7f3
commit
612d6aeba5
19
.env.example
19
.env.example
@ -1,3 +1,22 @@
|
||||
# Use a custom docker image name
|
||||
# Default: quilibrium
|
||||
QUILIBRIUM_IMAGE_NAME=
|
||||
|
||||
# Use a custom P2P port.
|
||||
# Default: 8336
|
||||
QUILIBRIUM_P2P_PORT=
|
||||
|
||||
# Use a custom gRPC port.
|
||||
# Default: 8337
|
||||
QUILIBRIUM_GRPC_PORT=
|
||||
|
||||
# Use a custom REST port.
|
||||
# Default: 8338
|
||||
QUILIBRIUM_REST_PORT=
|
||||
|
||||
# The public DNS name or IP address for this Quilibrium node.
|
||||
NODE_PUBLIC_NAME=
|
||||
|
||||
# Use a custom configuration directory.
|
||||
# Default: .config
|
||||
QUILIBRIUM_CONFIG_DIR=
|
||||
|
||||
214
Taskfile.yaml
214
Taskfile.yaml
@ -1,9 +1,12 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
version: "3"
|
||||
|
||||
dotenv:
|
||||
- '.env'
|
||||
- ".env"
|
||||
|
||||
env:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
|
||||
vars:
|
||||
VERSION:
|
||||
@ -27,7 +30,7 @@ tasks:
|
||||
- echo -n "Commit :" && echo " {{.GIT_COMMIT}}"
|
||||
- echo -n "Max Key ID:" && echo " {{.MAX_KEY_ID}}"
|
||||
silent: true
|
||||
|
||||
|
||||
build_node_arm64_macos:
|
||||
desc: Build the Quilibrium node binary for MacOS ARM. Assumes it's ran from the same platform. Outputs to node/build.
|
||||
cmds:
|
||||
@ -52,3 +55,208 @@ tasks:
|
||||
- rpm/generate.sh
|
||||
- client/build.sh -o build/arm64_macos/qclient
|
||||
|
||||
backup:
|
||||
desc: Create a backup file with the critical configuration files.
|
||||
prompt: You will be prompted for root access. Make sure you verify the generated backup file. Continue?
|
||||
preconditions:
|
||||
- sh: 'test -d .config'
|
||||
msg: '.config does not exists!'
|
||||
- sh: 'test -f .config/config.yml'
|
||||
msg: '.config/config.yml does not exists!'
|
||||
- sh: 'test -f .config/keys.yml'
|
||||
msg: '.config/keys.yml does not exists!'
|
||||
- sh: '! test -f backup.tar.gz'
|
||||
msg: 'A previous backup.tar.gz found in the current folder!'
|
||||
sources:
|
||||
- '.config/config.yml'
|
||||
- '.config/keys.yml'
|
||||
generates:
|
||||
- 'backup.tar.gz'
|
||||
cmds:
|
||||
- |
|
||||
export TMP_DIR=$(mktemp -d)
|
||||
export TASK_DIR=$(pwd)
|
||||
sudo cp .config/config.yml $TMP_DIR
|
||||
sudo cp .config/keys.yml $TMP_DIR
|
||||
sudo chown $(whoami):$(id -gn) $TMP_DIR/*
|
||||
cd $TMP_DIR
|
||||
tar -czf $TASK_DIR/backup.tar.gz *
|
||||
cd $TASK_DIR
|
||||
sudo rm -rf $TMP_DIR
|
||||
echo "Backup saved to: backup.tar.gz"
|
||||
echo "Do not assume you have a backup unless you verify it!!!"
|
||||
silent: true
|
||||
|
||||
restore:
|
||||
desc: Restores a backup file with the critical configuration files.
|
||||
preconditions:
|
||||
- sh: '! test -d .config'
|
||||
msg: '.config already exists, restore cannot be performed safely!'
|
||||
- sh: 'test -f backup.tar.gz'
|
||||
msg: 'backup.tar.gz not found in the current folder!'
|
||||
sources:
|
||||
- 'backup.tar.gz'
|
||||
generates:
|
||||
- '.config/config.yml'
|
||||
- '.config/keys.yml'
|
||||
cmds:
|
||||
- |
|
||||
mkdir .config
|
||||
tar -xzf backup.tar.gz -C .config
|
||||
echo "Backup restored from: backup.tar.gz"
|
||||
silent: true
|
||||
|
||||
test:port:
|
||||
desc: Test if the P2P port is visible to the world.
|
||||
preconditions:
|
||||
- sh: 'test -x "$(command -v nc)"'
|
||||
msg: 'nc is not installed, install with "sudo apt install netcat"'
|
||||
- sh: 'test -n "$NODE_PUBLIC_NAME"'
|
||||
msg: 'The public DNS name or IP address of the server must be set in NODE_PUBLIC_NAME.'
|
||||
cmds:
|
||||
- 'nc -vzu ${NODE_PUBLIC_NAME} ${QUILIBRIUM_P2P_PORT:=8336}'
|
||||
|
||||
build_node_arm64_linux:
|
||||
desc: Build the Quilibrium node binary for ARM64 Linux. Outputs to node/build.
|
||||
cmds:
|
||||
- docker build --platform linux/arm64 -f docker/Dockerfile.source --output node/build/arm64_linux --target=node .
|
||||
|
||||
build_qclient_arm64_linux:
|
||||
desc: Build the QClient node binary for ARM64 Linux. Outputs to client/build.
|
||||
cmds:
|
||||
- docker build --platform linux/arm64 -f docker/Dockerfile.source --output client/build/arm64_linux --target=qclient .
|
||||
|
||||
build_node_amd64_linux:
|
||||
desc: Build the Quilibrium node binary for AMD64 Linux. Outputs to node/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.source --output node/build/amd64_linux --target=node .
|
||||
|
||||
build_conntest_amd64_linux:
|
||||
desc: Build the Quilibrium node connection test binary for AMD64 Linux. Outputs to conntest/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.conntest.source --output conntest/build/amd64_linux --target=conntest .
|
||||
|
||||
build_node_amd64_avx512_linux:
|
||||
desc: Build the Quilibrium node binary for AMD64 Linux with AVX-512 extensions. Outputs to node/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.sourceavx512 --output node/build/amd64_avx512_linux --target=node .
|
||||
|
||||
build_qclient_amd64_linux:
|
||||
desc: Build the QClient node binary for AMD64 Linux. Outputs to client/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.source --output client/build/amd64_linux --target=qclient .
|
||||
|
||||
build_qclient_amd64_avx512_linux:
|
||||
desc: Build the QClient node binary for AMD64 Linux with AVX-512 extensions. Outputs to client/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.sourceavx512 --output client/build/amd64_avx512_linux --target=qclient .
|
||||
|
||||
build_vdf_perf_analysis_amd64_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.vdf.source --output vdf/build/amd64_linux --target=vdf --progress=plain --no-cache .
|
||||
|
||||
build_vdf_perf_analysis_amd64_avx512_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.vdf.sourceavx512 --output vdf/build/amd64_avx512_linux --target=vdf-avx512 .
|
||||
|
||||
build_vdf_perf_analysis_amd64_zen3_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.vdf.sourcezen3 --output vdf/build/amd64_zen3_linux --target=vdf-zen3 --progress=plain --no-cache .
|
||||
|
||||
build_vdf_perf_analysis_amd64_zen4_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f docker/Dockerfile.vdf.sourcezen4 --output vdf/build/amd64_zen4_linux --target=vdf-zen4 --progress=plain --no-cache .
|
||||
|
||||
build_vdf_perf_analysis_arm64_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/arm64 -f docker/Dockerfile.vdf.source --output vdf/build/arm64_linux --target=vdf --progress=plain --no-cache .
|
||||
|
||||
build:source:
|
||||
desc: Build the Quilibrium docker image from source.
|
||||
cmds:
|
||||
- |
|
||||
docker build \
|
||||
-f docker/Dockerfile.source \
|
||||
--build-arg NODE_VERSION={{.VERSION}} \
|
||||
--build-arg GIT_REPO={{.GIT_REPO}} \
|
||||
--build-arg GIT_BRANCH={{.GIT_BRANCH}} \
|
||||
--build-arg GIT_COMMIT={{.GIT_COMMIT}} \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-source \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:source \
|
||||
.
|
||||
status:
|
||||
- |
|
||||
docker image inspect \
|
||||
${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-source \
|
||||
>/dev/null 2>/dev/null
|
||||
|
||||
build:release:
|
||||
desc: Build the Quilibrium docker image from release binaries.
|
||||
aliases:
|
||||
- build
|
||||
cmds:
|
||||
- |
|
||||
docker build \
|
||||
-f docker/Dockerfile.release \
|
||||
--build-arg NODE_VERSION={{.VERSION}} \
|
||||
--build-arg GIT_REPO={{.GIT_REPO}} \
|
||||
--build-arg GIT_BRANCH={{.GIT_BRANCH}} \
|
||||
--build-arg GIT_COMMIT={{.GIT_COMMIT}} \
|
||||
--build-arg MAX_KEY_ID={{.MAX_KEY_ID}} \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-release \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:release \
|
||||
.
|
||||
status:
|
||||
- |
|
||||
docker image inspect \
|
||||
${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-release \
|
||||
>/dev/null 2>/dev/null
|
||||
|
||||
docker:login:
|
||||
desc: Login to Docker hub
|
||||
aliases:
|
||||
- login
|
||||
cmds:
|
||||
- echo $DOCKER_TOKEN | docker login -u $DOCKER_USERNAME --password-stdin
|
||||
|
||||
push:
|
||||
desc: Push Quilibrium docker image to the container registry.
|
||||
cmds:
|
||||
- docker push ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}
|
||||
- docker push ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:latest
|
||||
|
||||
test:qclient:
|
||||
desc: Test the Quilibrium docker image.
|
||||
cmds:
|
||||
- client/test/run_tests.sh -d 'ubuntu' -v '24.04'
|
||||
|
||||
config:gen:
|
||||
desc: Generate configuration and keys using Go.
|
||||
cmds:
|
||||
- go run utils/config-gen --config {{.CONFIG_DIR | default ".config"}}
|
||||
|
||||
build:node:source:
|
||||
desc: Build the optimized Quilibrium node-only docker image.
|
||||
cmds:
|
||||
- |
|
||||
docker build \
|
||||
--target node-only \
|
||||
-f docker/Dockerfile.source \
|
||||
--build-arg NODE_VERSION={{.VERSION}} \
|
||||
--build-arg GIT_REPO={{.GIT_REPO}} \
|
||||
--build-arg GIT_BRANCH={{.GIT_BRANCH}} \
|
||||
--build-arg GIT_COMMIT={{.GIT_COMMIT}} \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-node-only \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:node-only \
|
||||
.
|
||||
|
||||
deploy:node:
|
||||
desc: Run the Quilibrium node using host networking and external config.
|
||||
cmds:
|
||||
- |
|
||||
docker run -d --name q-node \
|
||||
--network host \
|
||||
--restart unless-stopped \
|
||||
-v {{.CONFIG_DIR | default "$(pwd)/.config"}}:/root/.config \
|
||||
${QUILIBRIUM_IMAGE_NAME:-quilibrium}:node-only \
|
||||
-signature-check=false
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
# Use a custom docker image name
|
||||
# Default: quilibrium
|
||||
QUILIBRIUM_IMAGE_NAME=
|
||||
|
||||
# Use a custom P2P port.
|
||||
# Default: 8336
|
||||
QUILIBRIUM_P2P_PORT=
|
||||
|
||||
# Use a custom gRPC port.
|
||||
# Default: 8337
|
||||
QUILIBRIUM_GRPC_PORT=
|
||||
|
||||
# Use a custom REST port.
|
||||
# Default: 8338
|
||||
QUILIBRIUM_REST_PORT=
|
||||
|
||||
# The public DNS name or IP address for this Quilibrium node.
|
||||
NODE_PUBLIC_NAME=
|
||||
|
||||
# Use a custom configuration directory.
|
||||
# Default: ../.config (monorepo root)
|
||||
QUILIBRIUM_CONFIG_DIR=
|
||||
@ -1,306 +0,0 @@
|
||||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
|
||||
dotenv:
|
||||
- '.env'
|
||||
|
||||
env:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
|
||||
vars:
|
||||
PROJECT_NAME: quilibrium
|
||||
SERVICE_NAME: node
|
||||
VERSION:
|
||||
sh: cat ../config/version.go | grep -A 1 "func GetVersion() \[\]byte {" | grep -Eo '0x[0-9a-fA-F]+' | xargs printf "%d.%d.%d"
|
||||
GIT_REPO:
|
||||
sh: git config --get remote.origin.url | sed 's/\.git$//'
|
||||
GIT_BRANCH:
|
||||
sh: git rev-parse --abbrev-ref HEAD
|
||||
GIT_COMMIT:
|
||||
sh: git log -1 --format=%h
|
||||
MAX_KEY_ID: 17
|
||||
|
||||
tasks:
|
||||
status:
|
||||
desc: Display configuration info.
|
||||
cmds:
|
||||
- echo -n "Image name:" && echo " ${QUILIBRIUM_IMAGE_NAME:-quilibrium}"
|
||||
- echo -n "Version :" && echo " {{.VERSION}}"
|
||||
- echo -n "Repo :" && echo " {{.GIT_REPO}}"
|
||||
- echo -n "Branch :" && echo " {{.GIT_BRANCH}}"
|
||||
- echo -n "Commit :" && echo " {{.GIT_COMMIT}}"
|
||||
- echo -n "Max Key ID:" && echo " {{.MAX_KEY_ID}}"
|
||||
silent: true
|
||||
|
||||
up:
|
||||
desc: Run a new Quilibrium and related containers, through docker compose.
|
||||
cmds:
|
||||
- docker compose up -d
|
||||
|
||||
down:
|
||||
desc: Take down the Quilibrium containers, through docker compose.
|
||||
cmds:
|
||||
- docker compose down
|
||||
|
||||
pull:
|
||||
desc: Pull new Docker images corresponding to the Quilibrium containers, through docker compose.
|
||||
cmds:
|
||||
- docker compose pull
|
||||
|
||||
update:
|
||||
desc: Pull new Docker images corresponding to the Quilibrium containers, then restart all containers.
|
||||
cmds:
|
||||
- task: pull
|
||||
- task: down
|
||||
- task: up
|
||||
|
||||
shell:
|
||||
desc: Drop into a shell inside the running container.
|
||||
cmds:
|
||||
- docker compose exec -it {{.SERVICE_NAME}} sh
|
||||
|
||||
logs:
|
||||
desc: Print the logs of the running Quilibrium container.
|
||||
cmds:
|
||||
- docker compose logs -f
|
||||
|
||||
logs-folder:
|
||||
desc: Show where Docker stores the logs for the Quilibrium node. You need root permissions to access the folder.
|
||||
cmds:
|
||||
- "docker container inspect {{.PROJECT_NAME}}-{{.SERVICE_NAME}}-1 | grep LogPath | cut -d : -f 2 | cut -d '\"' -f 2 | xargs dirname"
|
||||
|
||||
node-info:
|
||||
desc: Displays node related info for a running node.
|
||||
cmds:
|
||||
- docker compose exec node node -node-info
|
||||
|
||||
backup:
|
||||
desc: Create a backup file with the critical configuration files.
|
||||
prompt: You will be prompted for root access. Make sure you verify the generated backup file. Continue?
|
||||
preconditions:
|
||||
- sh: 'test -d ../.config'
|
||||
msg: '.config does not exists!'
|
||||
- sh: 'test -f ../.config/config.yml'
|
||||
msg: '.config/config.yml does not exists!'
|
||||
- sh: 'test -f ../.config/keys.yml'
|
||||
msg: '.config/keys.yml does not exists!'
|
||||
- sh: '! test -f backup.tar.gz'
|
||||
msg: 'A previous backup.tar.gz found in the current folder!'
|
||||
sources:
|
||||
- '../.config/config.yml'
|
||||
- '../.config/keys.yml'
|
||||
generates:
|
||||
- 'backup.tar.gz'
|
||||
cmds:
|
||||
- |
|
||||
export TMP_DIR=$(mktemp -d)
|
||||
export TASK_DIR=$(pwd)
|
||||
sudo cp ../.config/config.yml $TMP_DIR
|
||||
sudo cp ../.config/keys.yml $TMP_DIR
|
||||
sudo chown $(whoami):$(id -gn) $TMP_DIR/*
|
||||
cd $TMP_DIR
|
||||
tar -czf $TASK_DIR/backup.tar.gz *
|
||||
cd $TASK_DIR
|
||||
sudo rm -rf $TMP_DIR
|
||||
echo "Backup saved to: backup.tar.gz"
|
||||
echo "Do not assume you have a backup unless you verify it!!!"
|
||||
silent: true
|
||||
|
||||
restore:
|
||||
desc: Restores a backup file with the critical configuration files.
|
||||
preconditions:
|
||||
- sh: '! test -d ../.config'
|
||||
msg: '.config already exists, restore cannot be performed safely!'
|
||||
- sh: 'test -f backup.tar.gz'
|
||||
msg: 'backup.tar.gz not found in the current folder!'
|
||||
sources:
|
||||
- 'backup.tar.gz'
|
||||
generates:
|
||||
- '../.config/config.yml'
|
||||
- '../.config/keys.yml'
|
||||
cmds:
|
||||
- |
|
||||
mkdir ../.config
|
||||
tar -xzf backup.tar.gz -C ../.config
|
||||
echo "Backup restored from: backup.tar.gz"
|
||||
silent: true
|
||||
|
||||
test:port:
|
||||
desc: Test if the P2P port is visible to the world.
|
||||
preconditions:
|
||||
- sh: 'test -x "$(command -v nc)"'
|
||||
msg: 'nc is not installed, install with "sudo apt install netcat"'
|
||||
- sh: 'test -n "$NODE_PUBLIC_NAME"'
|
||||
msg: 'The public DNS name or IP address of the server must be set in NODE_PUBLIC_NAME.'
|
||||
cmds:
|
||||
- 'nc -vzu ${NODE_PUBLIC_NAME} ${QUILIBRIUM_P2P_PORT:=8336}'
|
||||
|
||||
build_node_arm64_macos:
|
||||
desc: Build the Quilibrium node binary for MacOS ARM. Assumes it's ran from the same platform. Outputs to node/build.
|
||||
cmds:
|
||||
- ../vdf/generate.sh
|
||||
- ../bls48581/generate.sh
|
||||
- ../verenc/generate.sh
|
||||
- ../bulletproofs/generate.sh
|
||||
- ../ferret/generate.sh
|
||||
- ../channel/generate.sh
|
||||
- ../rpm/generate.sh
|
||||
- ../node/build.sh -o ../node/build/arm64_macos/node
|
||||
|
||||
build_qclient_arm64_macos:
|
||||
desc: Build the QClient node binary for MacOS ARM. Outputs to client/build
|
||||
cmds:
|
||||
- ../vdf/generate.sh
|
||||
- ../bls48581/generate.sh
|
||||
- ../verenc/generate.sh
|
||||
- ../bulletproofs/generate.sh
|
||||
- ../ferret/generate.sh
|
||||
- ../channel/generate.sh
|
||||
- ../rpm/generate.sh
|
||||
- ../client/build.sh -o ../client/build/arm64_macos/qclient
|
||||
|
||||
build_node_arm64_linux:
|
||||
desc: Build the Quilibrium node binary for ARM64 Linux. Outputs to node/build.
|
||||
cmds:
|
||||
- docker build --platform linux/arm64 -f Dockerfile.source --output ../node/build/arm64_linux --target=node ..
|
||||
|
||||
build_qclient_arm64_linux:
|
||||
desc: Build the QClient node binary for ARM64 Linux. Outputs to client/build.
|
||||
cmds:
|
||||
- docker build --platform linux/arm64 -f Dockerfile.source --output ../client/build/arm64_linux --target=qclient ..
|
||||
|
||||
build_node_amd64_linux:
|
||||
desc: Build the Quilibrium node binary for AMD64 Linux. Outputs to node/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.source --output ../node/build/amd64_linux --target=node ..
|
||||
|
||||
build_conntest_amd64_linux:
|
||||
desc: Build the Quilibrium node connection test binary for AMD64 Linux. Outputs to conntest/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.conntest.source --output ../conntest/build/amd64_linux --target=conntest ..
|
||||
|
||||
build_node_amd64_avx512_linux:
|
||||
desc: Build the Quilibrium node binary for AMD64 Linux with AVX-512 extensions. Outputs to node/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.sourceavx512 --output ../node/build/amd64_avx512_linux --target=node ..
|
||||
|
||||
build_qclient_amd64_linux:
|
||||
desc: Build the QClient node binary for AMD64 Linux. Outputs to client/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.source --output ../client/build/amd64_linux --target=qclient ..
|
||||
|
||||
build_qclient_amd64_avx512_linux:
|
||||
desc: Build the QClient node binary for AMD64 Linux with AVX-512 extensions. Outputs to client/build.
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.sourceavx512 --output ../client/build/amd64_avx512_linux --target=qclient ..
|
||||
|
||||
build_vdf_perf_analysis_amd64_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.vdf.source --output ../vdf/build/amd64_linux --target=vdf --progress=plain --no-cache ..
|
||||
|
||||
build_vdf_perf_analysis_amd64_avx512_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.vdf.sourceavx512 --output ../vdf/build/amd64_avx512_linux --target=vdf-avx512 ..
|
||||
|
||||
build_vdf_perf_analysis_amd64_zen3_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.vdf.sourcezen3 --output ../vdf/build/amd64_zen3_linux --target=vdf-zen3 --progress=plain --no-cache ..
|
||||
|
||||
build_vdf_perf_analysis_amd64_zen4_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/amd64 -f Dockerfile.vdf.sourcezen4 --output ../vdf/build/amd64_zen4_linux --target=vdf-zen4 --progress=plain --no-cache ..
|
||||
|
||||
build_vdf_perf_analysis_arm64_linux:
|
||||
cmds:
|
||||
- docker build --platform linux/arm64 -f Dockerfile.vdf.source --output ../vdf/build/arm64_linux --target=vdf --progress=plain --no-cache ..
|
||||
|
||||
build:source:
|
||||
desc: Build the Quilibrium docker image from source.
|
||||
cmds:
|
||||
- |
|
||||
docker build \
|
||||
-f Dockerfile.source \
|
||||
--build-arg NODE_VERSION={{.VERSION}} \
|
||||
--build-arg GIT_REPO={{.GIT_REPO}} \
|
||||
--build-arg GIT_BRANCH={{.GIT_BRANCH}} \
|
||||
--build-arg GIT_COMMIT={{.GIT_COMMIT}} \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-source \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:source \
|
||||
..
|
||||
status:
|
||||
- |
|
||||
docker image inspect \
|
||||
${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-source \
|
||||
>/dev/null 2>/dev/null
|
||||
|
||||
build:release:
|
||||
desc: Build the Quilibrium docker image from release binaries.
|
||||
aliases:
|
||||
- build
|
||||
cmds:
|
||||
- |
|
||||
docker build \
|
||||
-f Dockerfile.release \
|
||||
--build-arg NODE_VERSION={{.VERSION}} \
|
||||
--build-arg GIT_REPO={{.GIT_REPO}} \
|
||||
--build-arg GIT_BRANCH={{.GIT_BRANCH}} \
|
||||
--build-arg GIT_COMMIT={{.GIT_COMMIT}} \
|
||||
--build-arg MAX_KEY_ID={{.MAX_KEY_ID}} \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-release \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:release \
|
||||
..
|
||||
status:
|
||||
- |
|
||||
docker image inspect \
|
||||
${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-release \
|
||||
>/dev/null 2>/dev/null
|
||||
|
||||
docker:login:
|
||||
desc: Login to Docker hub
|
||||
aliases:
|
||||
- login
|
||||
cmds:
|
||||
- echo $DOCKER_TOKEN | docker login -u $DOCKER_USERNAME --password-stdin
|
||||
|
||||
push:
|
||||
desc: Push Quilibrium docker image to the container registry.
|
||||
cmds:
|
||||
- docker push ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}
|
||||
- docker push ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:latest
|
||||
|
||||
test:qclient:
|
||||
desc: Test the Quilibrium docker image.
|
||||
cmds:
|
||||
- ../client/test/run_tests.sh -d 'ubuntu' -v '24.04'
|
||||
|
||||
config:gen:
|
||||
desc: Generate configuration and keys using Go.
|
||||
cmds:
|
||||
- go run ../utils/config-gen --config {{.CONFIG_DIR | default "../.config"}}
|
||||
|
||||
build:node:source:
|
||||
desc: Build the optimized Quilibrium node-only docker image.
|
||||
cmds:
|
||||
- |
|
||||
docker build \
|
||||
--target node-only \
|
||||
-f Dockerfile.source \
|
||||
--build-arg NODE_VERSION={{.VERSION}} \
|
||||
--build-arg GIT_REPO={{.GIT_REPO}} \
|
||||
--build-arg GIT_BRANCH={{.GIT_BRANCH}} \
|
||||
--build-arg GIT_COMMIT={{.GIT_COMMIT}} \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:{{.VERSION}}-node-only \
|
||||
-t ${QUILIBRIUM_IMAGE_NAME:-quilibrium}:node-only \
|
||||
..
|
||||
|
||||
deploy:node:
|
||||
desc: Run the Quilibrium node using host networking and external config.
|
||||
cmds:
|
||||
- |
|
||||
docker run -d --name q-node \
|
||||
--network host \
|
||||
--restart unless-stopped \
|
||||
-v {{.CONFIG_DIR | default "$(pwd)/../.config"}}:/root/.config \
|
||||
${QUILIBRIUM_IMAGE_NAME:-quilibrium}:node-only \
|
||||
-signature-check=false
|
||||
@ -1,30 +0,0 @@
|
||||
name: quilibrium
|
||||
|
||||
# See sysctl related warning in README.md.
|
||||
# Host configuration changes are required.
|
||||
|
||||
services:
|
||||
node:
|
||||
image: ${QUILIBRIUM_IMAGE_NAME:-quilibrium}
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DEFAULT_LISTEN_GRPC_MULTIADDR=/ip4/0.0.0.0/tcp/8337
|
||||
- DEFAULT_LISTEN_REST_MULTIADDR=/ip4/0.0.0.0/tcp/8338
|
||||
- DEFAULT_STATS_MULTIADDR=/dns/stats.quilibrium.com/tcp/443
|
||||
ports:
|
||||
- '${QUILIBRIUM_P2P_PORT:-8336}:8336/udp' # p2p
|
||||
- '127.0.0.1:${QUILIBRIUM_GRPC_PORT:-8337}:8337/tcp' # gRPC
|
||||
- '127.0.0.1:${QUILIBRIUM_REST_PORT:-8338}:8338/tcp' # REST
|
||||
healthcheck:
|
||||
test: [ "CMD", "grpcurl", "-plaintext", "localhost:8337", "list", "quilibrium.node.node.pb.NodeService" ]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15m
|
||||
volumes:
|
||||
- ${QUILIBRIUM_CONFIG_DIR:-../.config}:/root/.config
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-file: "5"
|
||||
max-size: 2048m
|
||||
Loading…
Reference in New Issue
Block a user