Support mini pool. Cleanup

pull/123/head
Blade Doyle 2 years ago
parent 8045c40026
commit 5ef4134955

@ -5,14 +5,14 @@ WALLET_ADDRESS="44MnN1f3Eto8DZYUWuE5XZNUtE3vcRzt2j6PzqWpPau34e6Cf4fAxt6X2MBmrm6F
## ##
# p2pool settings # p2pool settings
# #
# Use p2pool-mini (uncomment to enable)
#P2POOL_MINI="--mini"
#
# Which port to listen for miner connections # Which port to listen for miner connections
P2POOL_STRATUM_PORT=3333 P2POOL_STRATUM_PORT=3333
# #
# How much logging - (Less) 0 - 6 (More) # How much logging - (Less) 0 - 6 (More)
P2POOL_LOGLEVEL=2 P2POOL_LOGLEVEL=2
#
# The name of docker volume to hold p2pool data (created automatically if it doesnt exist)
P2POOL_VOLUME=p2pool
## ##
@ -24,8 +24,8 @@ MONERO_GIT_TAG=latest
# Limit the size of the blockchain on disk (comment to disable) # Limit the size of the blockchain on disk (comment to disable)
PRUNE_NODE="--prune-blockchain" PRUNE_NODE="--prune-blockchain"
# #
# The name of docker volume to hold p2pool data (created automatically if it doesnt exist) # Other monerod commandline options
MONERO_VOLUME=monero MONERO_EXTRA_OPTIONS=""
## ##
@ -34,5 +34,9 @@ MONERO_VOLUME=monero
# Submit shares at a lower fixed difficulty to show mining progress (comment to disable, edit to customize) # Submit shares at a lower fixed difficulty to show mining progress (comment to disable, edit to customize)
FIXED_MINING_DIFFICULTY="-u x+500000" FIXED_MINING_DIFFICULTY="-u x+500000"
# #
# Limit the number of CPU cores to use for mining (uncomment to enable, edit to customize) # set process priority (0 idle, 2 normal to 5 highest)
#NUM_MINING_CPU="-t 4" MINING_CPU_PRIORITY="--cpu-priority=2"
#
# Other XMRIG commandline options
# See: https://xmrig.com/docs/miner/command-line-options
XMRIG_EXTRA_OPTIONS=""

@ -31,15 +31,18 @@ docker-compose up
``` ```
#### Optional #### Optional
* Open ports 18080 (Monero p2p port) and 37889 (P2Pool p2p port) in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine * Open ports 18080 (Monero p2p port) and 37889 (P2Pool p2p port) or 37888 (P2Pool-mini p2p port) in your firewall to ensure better connectivity. If you're mining from a computer behind NAT (like a router) you could consider forwarding the ports to your local machine
* An XMRig CPU miner is included by default, but you can connect additional miners to this same p2pool node using port 3333 * An XMRig CPU miner is included by default, but you can connect additional miners to this same p2pool node using port 3333
* Configure your kernel for maximum mining performance: [XMRig RandomX Optimization Guide](https://xmrig.com/docs/miner/randomx-optimization-guide) * Configure your kernel for maximum mining performance: [XMRig RandomX Optimization Guide](https://xmrig.com/docs/miner/randomx-optimization-guide)
* Small miners can mine on p2pool-mini by editing the .env file
#### Other usefull commands #### Other usefull commands
* You can **run everythng in the background** by adding the "-d" argument to the "docker-compose up" command: ```docker-compose up -d``` * You can **run everythng in the background** by adding the "-d" argument to the "docker-compose up" command: ```docker-compose up -d```
* You can **stop everything** with CTRL-C or ```docker-compose down``` * You can **stop everything** with CTRL-C or ```docker-compose down```
* You can see logs when running in the background for with the "docker logs" command: ```docker logs -f p2pool-xmrig``` or ```docker logs -f p2pool-p2pool``` or ```docker logs -f p2pool-monero``` * You can see logs when running in the background for with the "docker logs" command: ```docker logs -f p2pool-xmrig``` or ```docker logs -f p2pool-p2pool``` or ```docker logs -f p2pool-monero```
* You can pause mining with: ```docker-compose pause xmrig``` and resume mining with: ```docker-compose unpause xmrig```
* You can disable mining with: ```docker-compose stop xmrig``` and re-enable mining with: ```docker-compose start xmrig```
#### Uninstall #### Uninstall

@ -7,9 +7,9 @@ networks:
volumes: volumes:
p2pool: p2pool:
name: ${P2POOL_VOLUME} name: p2pool
monero: monero:
name: ${MONERO_VOLUME} name: monero
services: services:
monero: monero:
@ -17,7 +17,7 @@ services:
build: build:
context: monero context: monero
args: args:
- MONERO_GIT_TAG=$MONERO_GIT_TAG - MONERO_GIT_TAG=${MONERO_GIT_TAG}
container_name: p2pool-monero container_name: p2pool-monero
networks: networks:
- p2pool - p2pool
@ -39,6 +39,7 @@ services:
--rpc-bind-port=18081 --rpc-bind-port=18081
--confirm-external-bind --confirm-external-bind
${PRUNE_NODE} ${PRUNE_NODE}
${MONERO_EXTRA_OPTIONS}
p2pool: p2pool:
image: p2pool:latest image: p2pool:latest
@ -48,6 +49,7 @@ services:
- p2pool - p2pool
ports: ports:
- ${P2POOL_STRATUM_PORT}:3333/tcp - ${P2POOL_STRATUM_PORT}:3333/tcp
- 37888:37888/tcp
- 37889:37889/tcp - 37889:37889/tcp
volumes: volumes:
- p2pool:/home/p2pool/.p2pool:rw - p2pool:/home/p2pool/.p2pool:rw
@ -60,6 +62,7 @@ services:
--host monero --host monero
--wallet ${WALLET_ADDRESS} --wallet ${WALLET_ADDRESS}
--loglevel ${P2POOL_LOGLEVEL} --loglevel ${P2POOL_LOGLEVEL}
${P2POOL_MINI}
xmrig: xmrig:
image: xmrig:latest image: xmrig:latest
@ -77,7 +80,7 @@ services:
restart: unless-stopped restart: unless-stopped
command: >- command: >-
${FIXED_MINING_DIFFICULTY} ${FIXED_MINING_DIFFICULTY}
${NUM_MINING_CPU} ${MINING_CPU_PRIORITY}
${XMRIG_EXTRA_OPTIONS}
--randomx-1gb-pages --randomx-1gb-pages
-o p2pool:3333 -o p2pool:3333

Loading…
Cancel
Save