diff --git a/Dockerfile b/Dockerfile index de61a99205..d6a654b74b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM dockerfile/nodejs +FROM node:0.10 MAINTAINER Matthias Luebken, matthias@catalyst-zero.com @@ -20,7 +20,7 @@ RUN bower install --config.interactive=false --allow-root # Make everything available for start ADD . /home/mean -# currently only works for development +# Set development environment as default ENV NODE_ENV development # Port 3000 for server diff --git a/README.md b/README.md index 276db76565..80b5961f71 100644 --- a/README.md +++ b/README.md @@ -101,12 +101,12 @@ $ grunt test:client ## Development and deployment With Docker -* Install [Docker](http://www.docker.com/) -* Install [Fig](https://github.com/orchardup/fig) +* Install [Docker](https://docs.docker.com/installation/#installation) +* Install [Compose](https://docs.docker.com/compose/install/) -* Local development and testing with fig: +* Local development and testing with compose: ```bash -$ fig up +$ docker-compose up ``` * Local development and testing with just Docker: diff --git a/config/env/development.js b/config/env/development.js index ab18fd0f9f..150f50eca0 100644 --- a/config/env/development.js +++ b/config/env/development.js @@ -2,7 +2,7 @@ module.exports = { db: { - uri: 'mongodb://localhost/mean-test', + uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean-test', options: { user: '', pass: '' diff --git a/config/env/test.js b/config/env/test.js index 3959a5bfc6..de57686f00 100644 --- a/config/env/test.js +++ b/config/env/test.js @@ -2,13 +2,13 @@ module.exports = { db: { - uri: 'mongodb://localhost/mean-test', + uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean-test', options: { user: '', pass: '' } }, - port: 3001, + port: process.env.PORT || 3001, app: { title: 'MEAN.JS - Test Environment' }, diff --git a/fig.yml b/docker-compose.yml similarity index 100% rename from fig.yml rename to docker-compose.yml