diff --git a/.gitignore b/.gitignore index 564bbba..14e937c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -.vagrant -node_modules +/.vagrant +/node_modules +/db diff --git a/README.md b/README.md index 80e9cc1..4cf485d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![License](https://img.shields.io/github/license/JoeBiellik/paste.svg)](http://opensource.org/licenses/MIT) [![Release Version](https://img.shields.io/github/release/JoeBiellik/paste.svg)](https://github.com/JoeBiellik/paste/releases) [![Dependencies](https://img.shields.io/david/JoeBiellik/paste.svg)](https://david-dm.org/JoeBiellik/paste) -[![Node.js Version](https://img.shields.io/badge/node.js-%3E=_0.11-red.svg)](https://nodejs.org/download/) +[![Node.js Version](https://img.shields.io/badge/node.js-%3E=_4.0-red.svg)](https://nodejs.org/download/) Simple [Node.js](https://nodejs.org/) pastebin built with [Koa](http://koajs.com/), [MongoDB](https://www.mongodb.org/), [Jade](http://jade-lang.com/), [Bootstrap 4](http://v4-alpha.getbootstrap.com/) and [Prism.js](http://prismjs.com/). diff --git a/config/docker.json b/config/docker.json new file mode 100644 index 0000000..edee2e5 --- /dev/null +++ b/config/docker.json @@ -0,0 +1,4 @@ +{ + "port": 80, + "db": "db/paste" +} diff --git a/docker-compose.yml b/docker-compose.yml index 649163b..b9b0953 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,7 @@ db: image: mongo:latest command: "--smallfiles" - hostname: "db" - container_name: "db" ports: - - "27017:27017" + - 27017:27017 volumes: - - ~/mongo:/data/db + - ~/db:/data/db diff --git a/production.yml b/production.yml new file mode 100644 index 0000000..0edad42 --- /dev/null +++ b/production.yml @@ -0,0 +1,20 @@ +node: + image: node:latest + command: "npm start" + working_dir: /app + links: + - db + environment: + - NODE_ENV=docker + volumes: + - .:/app + ports: + - 3000:80 + +db: + image: mongo:latest + command: "--smallfiles" + volumes: + - ./db:/data/db + expose: + - 27017