2022-06-17 04:34:41 +00:00
|
|
|
---
|
|
|
|
version: '3.4'
|
|
|
|
|
|
|
|
networks:
|
|
|
|
p2pool:
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
p2pool:
|
2022-07-17 14:55:16 +00:00
|
|
|
{% if sidechain[0] == 0 %}
|
2022-06-17 04:34:41 +00:00
|
|
|
name: p2pool
|
2022-07-17 14:55:16 +00:00
|
|
|
{% else %}
|
|
|
|
name: p2pool-mini
|
|
|
|
{% endif %}
|
|
|
|
|
2022-06-17 04:34:41 +00:00
|
|
|
{% if configure_monero == True %}
|
|
|
|
monero:
|
|
|
|
name: monero
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
services:
|
|
|
|
p2pool:
|
|
|
|
image: p2pool:latest
|
|
|
|
build: ../
|
|
|
|
container_name: p2pool-p2pool
|
|
|
|
networks:
|
|
|
|
- p2pool
|
2022-07-07 13:38:59 +00:00
|
|
|
privileged: true
|
2022-06-17 04:34:41 +00:00
|
|
|
ports:
|
|
|
|
{% if sidechain[0] == 0 %}
|
|
|
|
- 37888:37888/tcp
|
|
|
|
{% else %}
|
|
|
|
- 37889:37889/tcp
|
|
|
|
{% endif %}
|
|
|
|
{% if expose_stratum_port == True %}
|
2022-07-07 13:38:59 +00:00
|
|
|
- {{ stratum_port }}:3333/tcp
|
2022-06-17 04:34:41 +00:00
|
|
|
{% endif %}
|
|
|
|
volumes:
|
|
|
|
- p2pool:/home/p2pool/.p2pool:rw
|
|
|
|
- /dev/null:/home/p2pool/.p2pool/p2pool.log:rw
|
|
|
|
- /dev/hugepages:/dev/hugepages:rw
|
|
|
|
{% if configure_monero == True %}
|
|
|
|
depends_on:
|
|
|
|
- monero
|
|
|
|
{% endif %}
|
|
|
|
restart: unless-stopped
|
|
|
|
command: >-
|
|
|
|
{% if configure_monero == True %}
|
|
|
|
--host monero
|
|
|
|
{% else %}
|
|
|
|
--host {{ public_monero_node }}
|
|
|
|
--rpc-login {{ monero_node_login }}
|
|
|
|
{% endif %}
|
|
|
|
--wallet {{ wallet_address }}
|
|
|
|
--loglevel {{ p2pool_log_level | int }}
|
|
|
|
{% if sidechain[0] == 1 %}
|
|
|
|
--mini
|
|
|
|
{% endif %}
|
|
|
|
{% if enable_autodiff == False %}
|
|
|
|
--no-autodiff
|
|
|
|
{% endif %}
|
2022-07-07 13:38:59 +00:00
|
|
|
{% if enable_statistics == True %}
|
|
|
|
--local-api
|
|
|
|
--data-api /home/p2pool/.p2pool
|
|
|
|
{% endif %}
|
|
|
|
{% if light_mode == True %}
|
|
|
|
--light-mode
|
|
|
|
{% endif %}
|
|
|
|
{% if no_cache == True %}
|
|
|
|
--no-cache
|
|
|
|
{% endif %}
|
|
|
|
{% if rpc_login != "" %}
|
|
|
|
--rpc-login {{ rpc_login }}
|
|
|
|
{% endif %}
|
2022-06-17 04:34:41 +00:00
|
|
|
{% if p2pool_options != "" %}
|
|
|
|
{{ p2pool_options }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2022-07-07 13:38:59 +00:00
|
|
|
{% if enable_statistics == True %}
|
|
|
|
statistics:
|
|
|
|
image: statistics:latest
|
|
|
|
build:
|
|
|
|
context: statistics
|
|
|
|
container_name: p2pool-statistics
|
|
|
|
networks:
|
|
|
|
- p2pool
|
|
|
|
ports:
|
|
|
|
- {{ statistics_port }}:80/tcp
|
|
|
|
volumes:
|
|
|
|
- p2pool:/data:ro
|
|
|
|
depends_on:
|
|
|
|
- p2pool
|
|
|
|
restart: unless-stopped
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
2022-06-17 04:34:41 +00:00
|
|
|
{% if configure_monero == True %}
|
|
|
|
monero:
|
|
|
|
image: monero:latest
|
|
|
|
build:
|
|
|
|
context: monero
|
|
|
|
args:
|
|
|
|
- MONERO_GIT_TAG={{ monero_version }}
|
|
|
|
container_name: p2pool-monero
|
|
|
|
networks:
|
|
|
|
- p2pool
|
|
|
|
ports:
|
|
|
|
- 18080:18080/tcp
|
2022-07-07 13:38:59 +00:00
|
|
|
{% if expose_rpc_port == True %}
|
|
|
|
- {{ rpc_port }}:18081/tcp
|
|
|
|
{% endif %}
|
2022-06-17 04:34:41 +00:00
|
|
|
volumes:
|
|
|
|
- monero:/home/monero/.bitmonero:rw
|
|
|
|
- /dev/null:/home/monero/.bitmonero/bitmonero.log:rw
|
|
|
|
- /dev/hugepages:/dev/hugepages:rw
|
|
|
|
restart: unless-stopped
|
|
|
|
command: >-
|
|
|
|
--zmq-pub tcp://0.0.0.0:18083
|
|
|
|
--disable-dns-checkpoints
|
|
|
|
--enable-dns-blocklist
|
|
|
|
--non-interactive
|
|
|
|
--p2p-bind-ip=0.0.0.0
|
|
|
|
--p2p-bind-port=18080
|
|
|
|
--rpc-bind-ip=0.0.0.0
|
|
|
|
--rpc-bind-port=18081
|
2022-07-07 13:38:59 +00:00
|
|
|
--restricted-rpc
|
2022-06-17 04:34:41 +00:00
|
|
|
--confirm-external-bind
|
|
|
|
--log-level={{ monero_log_level | int }}
|
|
|
|
{% if prune_blockchain == True %}
|
|
|
|
--prune-blockchain
|
2022-07-07 13:38:59 +00:00
|
|
|
{% if sync_pruned_blocks == True %}
|
|
|
|
--sync-pruned-blocks
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if rpc_login != "" %}
|
|
|
|
--rpc-login {{ rpc_login }}
|
|
|
|
{% endif %}
|
|
|
|
{% if limit_data_rates == True %}
|
|
|
|
--limit-rate-up {{ rate_limit_up }}
|
|
|
|
--limit-rate-down {{ rate_limit_down }}
|
|
|
|
{% endif %}
|
|
|
|
{% if fast_sync == True %}
|
|
|
|
--fast-block-sync=1
|
|
|
|
{% else %}
|
|
|
|
--fast-block-sync=0
|
2022-06-17 04:34:41 +00:00
|
|
|
{% endif %}
|
|
|
|
{% if monero_options != "" %}
|
|
|
|
{{ monero_options }}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if configure_xmrig == True %}
|
|
|
|
xmrig:
|
|
|
|
image: xmrig:latest
|
|
|
|
build: xmrig
|
|
|
|
container_name: p2pool-xmrig
|
|
|
|
networks:
|
|
|
|
- p2pool
|
|
|
|
privileged: true
|
|
|
|
volumes:
|
|
|
|
- /dev:/dev:ro
|
|
|
|
- /lib/modules:/lib/modules:ro
|
|
|
|
- /dev/hugepages:/dev/hugepages:rw
|
|
|
|
depends_on:
|
|
|
|
- p2pool
|
|
|
|
restart: unless-stopped
|
|
|
|
command: >-
|
|
|
|
--randomx-1gb-pages
|
|
|
|
-o p2pool:3333
|
|
|
|
{% if enable_autodiff == False and use_fixed_difficulty == True %}
|
|
|
|
-u {{ xmrig_username }}+{{ fixed_difficulty | int }}
|
|
|
|
{% else %}
|
|
|
|
-u {{ xmrig_username }}
|
|
|
|
{% endif %}
|
|
|
|
--cpu-max-threads-hint={{ cpu_percent | int }}
|
2022-07-07 13:38:59 +00:00
|
|
|
--cpu-priority={{ cpu_priority | int }}
|
2022-06-17 04:34:41 +00:00
|
|
|
{% if xmrig_options != "" %}
|
|
|
|
{{ xmrig_options }}
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|