From e5b7f7d1e7baad4d317e2289c077cd18859ea511 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 23 Oct 2023 14:12:38 +1100 Subject: [PATCH] feat: Add docker --- Dockerfile | 15 +++++++++++++++ README.md | 8 ++++++++ 2 files changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0b0692c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# Use an official Node.js runtime as the base image +FROM node:14 + +# Set the working directory in the container +WORKDIR /app + +# Copy your application files to the container +COPY . . + + +# Command to run your Node.js application +CMD ["node", "build/hip2-server.js", "3000"] + + +# docker run -p 3000:3000 -v ~/Downloads/xpub:/app/conf/xpub \ No newline at end of file diff --git a/README.md b/README.md index 4bb6875..4643152 100644 --- a/README.md +++ b/README.md @@ -109,3 +109,11 @@ recovery wallet before rescanning. After the hip2-server serves `0x7fffffff` addresses, it will start over at index `0` and recycle. The `log/hip2-index` file will continue to increment, so users should also take action if they see the value in that file exceed `2147483647`. + + +### Docker (experimental) + +``` +sudo docker build -t hip2-server . +sudo docker run -p 3000:3000 -v ~/Downloads/xpub:/app/conf/xpub hip2-server +``` \ No newline at end of file