diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c6a776e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:8.6.0 + +WORKDIR /usr/src/app + +COPY package.json . +COPY pagepark.js . + +RUN mkdir /usr/src/app/domains +RUN mkdir /usr/src/app/prefs + +RUN npm install + +EXPOSE 1339 + +CMD ["node", "pagepark.js"] + + + diff --git a/README.md b/README.md index 24d49e2..044e613 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,23 @@ I wanted to make code that could be used for people who are just getting started There will always be more work to do here. ;-) +### Dockerfile + +You can run pagepark inside a docker container with the following procedure + +1. Install docker on your server +2. Clone this repo and `cd` to it's directory +3. Build the image with the following command `docker build -t pagepark/pagerank` +4. Run the image like this `docker -p 1339:1339 run pagepark/pagerank` + +You can choose a different port or even the port 80 with the following command: + +`docker run -p 80:1339 run pagepark/pagerank` + +You can mount the `domains` and `prefs` folder in a local destination of you choosing with this command: + +`docker run -v path_to_domains_folder:/usr/app/src/domains -v path_to_prefs_folder:/usr/app/src/prefs -p 80:1339 pagepark/pagerank` + ### Updates #### v0.7.9 11/8/17 by DW