Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add pull policy and dependencies #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
64 changes: 38 additions & 26 deletions docker-compose-config-a.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ version: '3'

volumes:
prometheus_data_config_a:
grafana_data_config_a:
grafana_data_config_a:
bitcoin_pool_side_data:
bitcoin_miner_side_data:
bitcoin_sv1_pool_side_data:
@@ -22,35 +22,40 @@ services:
build:
dockerfile: ./sri-roles.dockerfile
container_name: sv2-roles-builder
image: sv2-roles-builder-image
command: echo "SRI build completed"

image: sv2-roles-builder-image
command: echo "SRI build completed"
pull_policy: build

#sv2-custom-proxy-builder:
#build:
#dockerfile: custom-proxies.dockerfile
#container_name: sv2-custom-proxy-builder
#image: sv2-custom-proxy-builder-image
#image: sv2-custom-proxy-builder-image
#command: echo "sv2-custom-proxy build completed"

sv1-custom-proxy-builder:
build:
dockerfile: ./sv1-custom-proxy/Dockerfile
container_name: sv1-custom-proxy-builder
image: sv1-custom-proxy-builder-image
image: sv1-custom-proxy-builder-image
command: echo "sv1-custom-proxy build completed"

pools-latency-calculator-builder:
build:
dockerfile: pools-latency-calculator.dockerfile
container_name: pools-latency-calculator-builder
image: pools-latency-calculator-builder-image
image: pools-latency-calculator-builder-image
command: echo "pools-latency-calculator build completed"
pull_policy: build

template-provider-pool-side:
depends_on:
- sv2-roles-builder
build:
dockerfile: ./template-provider.dockerfile
pull_policy: build
image: sv2-template-provider
command: ["/bitcoin/src/bitcoind", "-testnet4", "-sv2", "-sv2port=8442", "-sv2interval=60", "-sv2feedelta=0", "-debug=sv2", "-loglevel=sv2:trace", "-sv2bind=0.0.0.0"]
command: ["/bitcoin/src/bitcoind", "-testnet4", "-sv2", "-sv2port=8442", "-sv2interval=60", "-sv2feedelta=0", "-debug=sv2", "-loglevel=sv2:trace", "-sv2bind=0.0.0.0"]
ports:
- "8442:8442"
- "18333:48333"
@@ -68,8 +73,9 @@ services:
template-provider-miner-side:
build:
dockerfile: ./template-provider.dockerfile
pull_policy: build
image: sv2-template-provider
command: ["/bitcoin/src/bitcoind", "-testnet4", "-sv2", "-sv2port=8443", "-sv2interval=15", "-sv2feedelta=0", "-debug=sv2", "-loglevel=sv2:trace", "-sv2bind=0.0.0.0"]
command: ["/bitcoin/src/bitcoind", "-testnet4", "-sv2", "-sv2port=8443", "-sv2interval=15", "-sv2feedelta=0", "-debug=sv2", "-loglevel=sv2:trace", "-sv2bind=0.0.0.0"]
ports:
- "8443:8443"
- "28333:18333"
@@ -85,8 +91,9 @@ services:
sv1-node-pool-side:
build:
dockerfile: ./template-provider.dockerfile
pull_policy: build
image: sv2-template-provider
command: ["/bitcoin/src/bitcoind", "-testnet4"]
command: ["/bitcoin/src/bitcoind", "-testnet4"]
ports:
- "38333:18333"
- "48333:48332"
@@ -100,10 +107,10 @@ services:
ipv4_address: 10.5.0.16

pool:
image: sv2-roles-builder-image
image: sv2-roles-builder-image
command: ["./target/release/pool_sv2", "-c", "pool/config-examples/pool-config-a-docker-example.toml"]
ports:
- "34254:34254"
- "34254:34254"
container_name: sv2-pool
depends_on:
- sv2-roles-builder
@@ -119,7 +126,7 @@ services:
image: sv2-roles-builder-image
command: ["./target/release/jd_server", "-c", "jd-server/config-examples/jds-config-a-docker-example.toml"]
ports:
- "34264:34264"
- "34264:34264"
container_name: sv2-jds
depends_on:
- sv2-roles-builder
@@ -141,9 +148,10 @@ services:
- ./custom-configs/sri-roles/config-a:/usr/src/stratum/roles/jd-client/config-examples/
restart: unless-stopped
depends_on:
- pool
- pool
- jd-server
- template-provider-miner-side
- sv2-roles-builder
networks:
sv2-net:
ipv4_address: 10.5.0.6
@@ -152,10 +160,11 @@ services:
image: sv2-roles-builder-image
command: ["./target/release/translator_sv2", "-c", "translator/config-examples/tproxy-config-a-docker-example.toml"]
ports:
- "34255:34255"
- "34255:34255"
container_name: sv2-translator
depends_on:
- jd-client
- jd-client
- sv2-roles-builder
volumes:
- ./custom-configs/sri-roles/config-a:/usr/src/stratum/roles/translator/config-examples/
restart: unless-stopped
@@ -164,10 +173,10 @@ services:
ipv4_address: 10.5.0.7

#sv2-pool-jdc-proxy:
#image: sv2-custom-proxy-builder-image
#image: sv2-custom-proxy-builder-image
#command: ["./target/release/proxy-between-pool-and-jdc"]
#ports:
#- "34253:34254"
#- "34253:34254"
#- "34251:34251"
#environment:
#- SERVER=10.5.0.4:34254
@@ -185,6 +194,7 @@ services:

sv1-pool:
container_name: sv1-pool
pull_policy: build
build:
context: .
dockerfile: ./sv1-pool.dockerfile
@@ -194,7 +204,7 @@ services:
volumes:
- "./testnet-DB:/public-pool/DB"
- "./custom-configs/sv1-pool/.env:/public-pool/.env:ro"
- "./custom-configs/sv1-pool/rpc.js:/public-pool/node_modules/rpc-bitcoin/build/src/rpc.js" # to fix rpc-version field issue
- "./custom-configs/sv1-pool/rpc.js:/public-pool/node_modules/rpc-bitcoin/build/src/rpc.js" # to fix rpc-version field issue
restart: unless-stopped
environment:
- NODE_ENV=production
@@ -205,7 +215,7 @@ services:
- NET_ADMIN

sv1-custom-proxy:
image: sv1-custom-proxy-builder-image
image: sv1-custom-proxy-builder-image
command: ["./target/release/proxy-miner-sv1-pool"]
ports:
- "3333:3333"
@@ -262,8 +272,8 @@ services:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
@@ -276,7 +286,7 @@ services:
deploy:
mode: global
restart_policy:
condition: on-failure
condition: on-failure

cadvisor:
image: gcr.io/cadvisor/cadvisor
@@ -354,10 +364,12 @@ services:
ipv4_address: 10.5.0.15

pools-latency-calculator:
image: pools-latency-calculator-builder-image
depends_on:
- pools-latency-calculator-builder
image: pools-latency-calculator-builder-image
command: ["./target/release/pools-latency-calculator"]
ports:
- "1234:1234"
- "1234:1234"
container_name: pools-latency-calculator
restart: unless-stopped
networks: