From e3374358fe35c909c3f51a63d355c872878d0e22 Mon Sep 17 00:00:00 2001 From: Nikolas Hermann Date: Mon, 31 Jul 2017 17:08:53 +0200 Subject: [PATCH 1/2] add Dockerfile --- Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..70dac56 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM ubuntu:16.04 + +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get install -y git python-virtualenv python3-virtualenv curl ntp build-essential screen cmake pkg-config libboost-all-dev libevent-dev libunbound-dev libminiupnpc-dev libunwind8-dev liblzma-dev libldns-dev libexpat1-dev libgtest-dev libzmq3-dev + +RUN curl -fsSL https://deb.nodesource.com/setup_6.x -o /tmp/node_setup.sh \ + && bash /tmp/node_setup.sh \ + && rm /tmp/node_setup.sh \ + && apt-get install -y nodejs + +COPY . /app/ + +RUN cd /app/ \ + && npm install \ + && cp -n config_example.json config.json \ + && openssl req -subj "/C=IT/ST=Pool/L=Daemon/O=Mining Pool/CN=mining.proxy" -newkey rsa:2048 -nodes -keyout cert.key -x509 -out cert.pem -days 36500 + +EXPOSE 8080 8443 3333 + +WORKDIR /app/ +CMD ["node", "proxy.js"] From d623b6beadbed86031eac08200ca93cd1ff5a5c6 Mon Sep 17 00:00:00 2001 From: Nikolas Hermann Date: Mon, 31 Jul 2017 17:20:13 +0200 Subject: [PATCH 2/2] add docker section to readme --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 5c48ddb..e2df26d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,20 @@ or using the pm2 monitor pm2 monit ``` +Deployment via Docker +------------------------ + +1. Build the image + +``` +docker build . -t xmr-node-proxy +``` +2. Run the container, add custom config, expose some ports + +``` +docker run -v $PWD/config.json:/app/config.json -p 3333:3333 -p 8080:8080 -p 8443:8443 xmr-node-proxy +``` + Known Issues ============ VM's with 512Mb of ram or less will need some swap space in order to compile the C extensions for node. Bignum and the CN libraries can chew some serious memory during compile. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy