diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4729ef6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +.gitignore +LICENSE.md +README.md \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eb87609 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:8 + +RUN apt-get update && apt-get -y install build-essential + +WORKDIR /app + +COPY package*.json ./ + +RUN npm install + +COPY / ./ + +RUN cp settings-example.json settings.json + +EXPOSE 3000 + +CMD ["node", "server.js"] \ No newline at end of file diff --git a/README.md b/README.md index 8b60653..9618593 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ A website that provides placeholder images for every case, web or print, on almo 1. Edit `settings.json` to your liking (You'll also need to set your Flickr api key in there) 1. `npm start` +## Installation with Docker +1. Clone repository +1. `docker build -t loremflickr-node . && docker run -p 3000:3000 loremflickr-node` + ## Settings Settings can be set either by the `settings.json` file or by environmental variables (or both!). When using environmental variables you will need to use the `loremflickr_` prefix. For example: `export loremflickr_cache_expire=3600000`. Environmental variables take priority over `settings.json`.