From 1f612e95f14d4a04094425f3027a7e8c8d3dd5cb Mon Sep 17 00:00:00 2001 From: wmpadmin Date: Sat, 7 Jul 2018 11:53:29 +0200 Subject: [PATCH] added dockerization readme info --- README.md | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18b0c62..dfbb5b9 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ _The server_ is written in **C#**, **optionally calling C**-routines to check ha _The client_ runs in the browser using javascript and webassembly. **websockets** are used for the connection between the client and the server, **webassembly** to perform hash calculations, **web workers** for threads. -# What is new (you really should update!)? +Thanks to [nierdz](https://github.com/notgiven688/webminerpool/pull/62) there is a **docker** file available. See below. + +# What is new? - **June 15, 2018** - Support for blocks with more than 2^8 transactions. (**client-side** / **server-side**). @@ -136,9 +138,32 @@ should change this limit if you want to have more connections. The cryptonight hashing functions in C-code. With simple Makefiles (use the "make" command to compile) for use with gcc and emcc - the [emscripten](https://github.com/kripken/emscripten) webassembly compiler. *libhash* should be compiled so that the server can check hashes calculated by the user. -# ToDo +# Dockerization -Refactoring. Documentation. +Find the original pull request with instructions by [nierdz here]((https://github.com/notgiven688/webminerpool/pull/62)). + +Added Dockerfile and entrypoint.sh. +Inside entrypoint.sh, a certificate is installed so you need to provide a domain name during docker run. The certificate is automatically renewed using a cronjob. + +```bash +cd webminerpool +docker build -t webminerpool . +``` + +To run it: + +```bash +docker run -d -p 80:80 -p 8181:8181 -e DOMAIN=mydomain.com webminerpool +``` +You absolutely need to set a domain name. +The 80:80 bind is used to obtain a certificate. +The 8181:8181 bind is used for server itself. + +If you want to bind these ports to a specific IP, you can do this: + +```bash +docker run -d -p xx.xx.xx.xx:80:80 -p xx.xx.xx.xx:8181:8181 -e DOMAIN=mydomain.com webminerpool +``` # Developer Donations