From bf3ed06538fbb097eb1fb6b30861157808922a17 Mon Sep 17 00:00:00 2001 From: Gustavo Valverde Date: Fri, 22 Mar 2024 09:30:17 +0100 Subject: [PATCH] fix(build): typo in buildx --- .github/workflows/sub-build-docker-image.yml | 1 - docker/docker-compose.full.yml | 153 +++++++++++++++++++ 2 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 docker/docker-compose.full.yml diff --git a/.github/workflows/sub-build-docker-image.yml b/.github/workflows/sub-build-docker-image.yml index 92dd106b46c..01f6d25ecda 100644 --- a/.github/workflows/sub-build-docker-image.yml +++ b/.github/workflows/sub-build-docker-image.yml @@ -156,7 +156,6 @@ jobs: driver: cloud endpoint: "zfnd/zebra" driver-opts: | - network=host image=moby/buildkit:v0.13.0 # Build and push image to Google Artifact Registry, and possibly DockerHub diff --git a/docker/docker-compose.full.yml b/docker/docker-compose.full.yml new file mode 100644 index 00000000000..815ad941ea6 --- /dev/null +++ b/docker/docker-compose.full.yml @@ -0,0 +1,153 @@ +version: "3.8" + +services: + zebra: + image: zfnd/zebra + platform: linux/amd64 + build: + context: ../ + dockerfile: docker/Dockerfile + target: runtime + restart: unless-stopped + deploy: + resources: + reservations: + cpus: "4" + memory: 16G + depends_on: + prometheus: + condition: service_started + grafana: + condition: service_started + env_file: + - .zebra.env + # Change this to the commmand you want to run, respecting the entrypoint.sh + # For example, to run the tests, use the following command: + # command: ["cargo", "test", "--locked", "--release", "--features", "${TEST_FEATURES}", "--package", "zebrad", "--test", "acceptance", "--", "--nocapture", "--include-ignored", "sync_large_checkpoints_"] + #! Uncomment the following line to use a zebrad.toml from the host machine + # NOTE: This will override the zebrad.toml in the image and make some variables irrelevant + # configs: + # - source: zebra_config + # target: /etc/zebrad/zebrad.toml + # uid: '2001' # Rust's container default user uid + # gid: '2001' # Rust's container default group gid + # mode: 0440 + volumes: + - zebrad-cache:/var/cache/zebrad-cache + - lwd-cache:/var/cache/lwd-cache + ports: + # Zebra uses the following inbound and outbound TCP ports + - "8232:8232" # Opens an RPC endpoint (for wallet storing and mining) + - "8233:8233" # Mainnet Network (for peer connections) + - "18233:18233" # Testnet Network + # - "9999:9999" # Metrics + # - "3000:3000" # Tracing + healthcheck: + start_period: 3m + interval: 15s + timeout: 10s + retries: 3 + # test: ["CMD-SHELL", "curl --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", \"method\": \"getblockchaininfo\", \"params\": [] }' -H 'content-type: application/json' http://127.0.0.1:8232/ || exit 1"] + + lightwalletd: + image: electriccoinco/lightwalletd + platform: linux/amd64 + depends_on: + zebra: + condition: service_started + restart: unless-stopped + deploy: + resources: + reservations: + cpus: "4" + memory: 16G + env_file: + - .lightwalletd.env + configs: + - source: lwd_config + target: /etc/lightwalletd/zcash.conf + volumes: + - litewalletd-data:/var/lib/lightwalletd/db + # This setup with --no-tls-very-insecure is only for testing purposes + #! For production environments follow the guidelines here: https://github.com/zcash/lightwalletd#production-usage + command: > + --no-tls-very-insecure + --grpc-bind-addr=0.0.0.0:9067 + --http-bind-addr=0.0.0.0:9068 + --zcash-conf-path=/etc/lightwalletd/zcash.conf + --data-dir=/var/lib/lightwalletd/db + --log-file=/dev/stdout + --log-level=7 + ports: + - "9067:9067" # gRPC + - "9068:9068" # HTTP + + prometheus: + image: prom/prometheus + configs: + - source: prometheus_config + target: /etc/prometheus/prometheus.yml + volumes: + - prometheus-data:/prometheus + command: + - '--config.file=/etc/prometheus/prometheus.yml' + - '--storage.tsdb.path=/prometheus' + - '--web.enable-lifecycle' + ports: + - "9090:9090" + healthcheck: + test: wget --no-verbose --tries=1 --spider http://localhost:9090/status || exit 1 + start_period: 30s + interval: 10s + timeout: 15s + retries: 3 + + grafana: + image: grafana/grafana + volumes: + - grafana-data:/var/lib/grafana + - ../grafana/provisioning/:/etc/grafana/provisioning/ + # environment: + # GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD} + depends_on: + prometheus: + condition: service_healthy + env_file: + - ../grafana/config.monitoring + ports: + - "3000:3000" + healthcheck: + test: wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1 + interval: 30s + timeout: 10s + retries: 3 + +configs: + zebra_config: + # Change the following line to point to a zebrad.toml on your host machine + # to allow for easy configuration changes without rebuilding the image + file: ../zebrad/tests/common/configs/v1.0.0-rc.2.toml/ + + lwd_config: + # Change the following line to point to a zcash.conf on your host machine + # to allow for easy configuration changes without rebuilding the image + file: ./zcash-lightwalletd/zcash.conf + + prometheus_config: + file: ../prometheus.yaml + +volumes: + zebrad-cache: + driver: local + + lwd-cache: + driver: local + + litewalletd-data: + driver: local + + prometheus-data: + driver: local + + grafana-data: + driver: local