1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-17 03:31:53 +00:00

Update for redundant daemons

This commit is contained in:
David Young
2018-05-16 21:21:10 +12:00
parent dc1e97d3e1
commit d99a905837

View File

@@ -255,25 +255,34 @@ version: '3'
services: services:
daemon: daemon:
image: trtl/daemon image: funkypenguin/turtlecoind
user: "3506"
volumes: volumes:
- /var/data/turtle-pool/daemon:/daemon - /var/data/runtime/turtle-pool/daemon/{{.Task.Slot}}:/var/lib/turtlecoind/
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
networks: networks:
- traefik_public
- internal - internal
- traefik_public
ports:
- 11897:11897
deploy: deploy:
replicas: 2
labels: labels:
- traefik.frontend.rule=Host:explorer.trtl.heigh-ho.funkypenguin.co.nz - traefik.frontend.rule=Host:explorer.trtl.heigh-ho.funkypenguin.co.nz
- traefik.docker.network=traefik_public - traefik.docker.network=traefik_public
- traefik.port=1118 - traefik.port=11898
daemon-failsafe:
image: funkypenguin/turtlecoind
volumes:
- /var/data/runtime/turtle-pool/daemon/failsafe:/var/lib/turtlecoind/
- /etc/localtime:/etc/localtime:ro
networks:
- internal
entrypoint: | entrypoint: |
TurtleCoind --rpc-bind-ip=0.0.0.0 --enable_blockexplorer enable-cors=* TurtleCoind --seed-node daemon --no-console --load-checkpoints /tmp/checkpoints/checkpoints.csv && sleep 1h
pool-pool: pool-pool:
image: funkypenguin/turtle-pool image: funkypenguin/turtle-pool
user: "3506"
volumes: volumes:
- /var/data/turtle-pool/pool/config:/config:ro - /var/data/turtle-pool/pool/config:/config:ro
- /var/data/turtle-pool/pool/logs:/logs - /var/data/turtle-pool/pool/logs:/logs
@@ -289,14 +298,13 @@ services:
pool-api: pool-api:
image: funkypenguin/turtle-pool image: funkypenguin/turtle-pool
user: "3506"
volumes: volumes:
- /var/data/turtle-pool/pool/config:/config:ro - /var/data/turtle-pool/pool/config:/config:ro
- /var/data/turtle-pool/pool/logs:/logs - /var/data/turtle-pool/pool/logs:/logs
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
networks: networks:
- traefik_public
- internal - internal
- traefik_public
deploy: deploy:
labels: labels:
- traefik.frontend.rule=Host:api.trtl.heigh-ho.funkypenguin.co.nz - traefik.frontend.rule=Host:api.trtl.heigh-ho.funkypenguin.co.nz
@@ -307,7 +315,6 @@ services:
pool-unlocker: pool-unlocker:
image: funkypenguin/turtle-pool image: funkypenguin/turtle-pool
user: "3506"
volumes: volumes:
- /var/data/turtle-pool/pool/config:/config:ro - /var/data/turtle-pool/pool/config:/config:ro
- /var/data/turtle-pool/pool/logs:/logs - /var/data/turtle-pool/pool/logs:/logs
@@ -319,7 +326,6 @@ services:
pool-payments: pool-payments:
image: funkypenguin/turtle-pool image: funkypenguin/turtle-pool
user: "3506"
volumes: volumes:
- /var/data/turtle-pool/pool/config:/config:ro - /var/data/turtle-pool/pool/config:/config:ro
- /var/data/turtle-pool/pool/logs:/logs - /var/data/turtle-pool/pool/logs:/logs
@@ -331,7 +337,6 @@ services:
pool-charts: pool-charts:
image: funkypenguin/turtle-pool image: funkypenguin/turtle-pool
user: turtle-pool
volumes: volumes:
- /var/data/turtle-pool/pool/config:/config:ro - /var/data/turtle-pool/pool/config:/config:ro
- /var/data/turtle-pool/pool/logs:/logs - /var/data/turtle-pool/pool/logs:/logs
@@ -342,8 +347,7 @@ services:
node init.js -module=chartsDataCollector -config=/config/config.json node init.js -module=chartsDataCollector -config=/config/config.json
wallet: wallet:
image: trtl/daemon image: funkypenguin/turtlecoind
user: "3506"
volumes: volumes:
- /var/data/turtle-pool/wallet/config:/config:ro - /var/data/turtle-pool/wallet/config:/config:ro
- /var/data/turtle-pool/wallet/container:/container - /var/data/turtle-pool/wallet/container:/container
@@ -372,8 +376,8 @@ services:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
image: nginx image: nginx
networks: networks:
- traefik_public
- internal - internal
- traefik_public
deploy: deploy:
labels: labels:
- traefik.frontend.rule=Host:trtl.heigh-ho.funkypenguin.co.nz - traefik.frontend.rule=Host:trtl.heigh-ho.funkypenguin.co.nz
@@ -422,6 +426,8 @@ Two possible solutions to this are (1) disable banning, or (2) update the pool b
2. The traefik labels in the docker-compose are to permit automatic LetsEncrypt SSL-protected proxying of your pool UI and API addresses. 2. The traefik labels in the docker-compose are to permit automatic LetsEncrypt SSL-protected proxying of your pool UI and API addresses.
3. After a [power fault in my datacenter caused daemon DB corruption](https://www.reddit.com/r/TRTL/comments/8jftzt/funky_penguin_nz_mining_pool_down_with_daemon/), I added a second daemon, running in parallel to the first. The failsafe daemon runs once an hour, syncs with the running daemons, and shuts down again, providing a safely halted version of the daemon DB for recovery.
### Tip your waiter (donate) 👏 ### Tip your waiter (donate) 👏
Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏 Did you receive excellent service? Want to make your waiter happy? (_..and support development of current and future recipes!_) See the [support](/support/) page for (_free or paid)_ ways to say thank you! 👏