Wanting to learn about blockchain tech by building an NZ mining pool for TurtleCoin, I needed to make several minor adjustments to the existing nodejs-based mining pool code, to allow for better operation within Docker Swarm.
I started by contributing a Dockerfile to the repo, with the intention of allowing for future automated builds.
I soon discovered that I needed the pool daemon to exit if it was unable to start the pool for any reason (so that Docker would detect the exit and recreate the container)
Finally, for the charts data collection module to generate stats for the charts on the UI, I added the option to specify the host that the rest of the modules expected to use for the API (originally hardcoded to 127.0.0.1), since I was running each pool element in a separate container.
Several months later, I ported my mining pool to a more advanced fork of the original code, and made some TurtleCoin-specific modifications, allowing my fork to be used for other TurtleCoin pools. I now maintain a parallel repo in the TurtleCoin GitHub organisation for this code.
I later moved my pools to Google Kubernetes Engine, both to address limitations of my shared VPS hosting, and to learn more about Kubernetes.
I was recently interviewed for the TurtleCoin blog re how my little pool was built, and got to geek out a bit on the microservices aspects. Check it out!