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 dec285d123..7c24689840 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ [![Build Status](https://travis-ci.org/meanjs/mean.svg?branch=master)](https://travis-ci.org/meanjs/mean) [![Dependencies Status](https://david-dm.org/meanjs/mean.svg)](https://david-dm.org/meanjs/mean) -MEAN.JS is a full-stack JavaScript open-source solution, which provides a solid starting point for [MongoDB](http://www.mongodb.org/), [Node.js](http://www.nodejs.org/), [Express](http://expressjs.com/), and [AngularJS](http://angularjs.org/) based applications. The idea is to solve the common issues with connecting those frameworks, build a robust framework to support daily development needs, and help developers use better practices while working with popular JavaScript components. +MEAN.JS is a full-stack JavaScript open-source solution, which provides a solid starting point for [MongoDB](http://www.mongodb.org/), [Node.js](http://www.nodejs.org/), [Express](http://expressjs.com/), and [AngularJS](http://angularjs.org/) based applications. The idea is to solve the common issues with connecting those frameworks, build a robust framework to support daily development needs, and help developers use better practices while working with popular JavaScript components. -## Before You Begin -Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS application: +## Before You Begin +Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS application: * MongoDB - Go through [MongoDB Official Website](http://mongodb.org/) and proceed to their [Official Manual](http://docs.mongodb.org/manual/), which should help you understand NoSQL and MongoDB better. * Express - The best way to understand express is through its [Official Website](http://expressjs.com/), particularly [The Express Guide](http://expressjs.com/guide.html); you can also go through this [StackOverflow Thread](http://stackoverflow.com/questions/8144214/learning-express-for-node-js) for more resources. * AngularJS - Angular's [Official Website](http://angularjs.org/) is a great starting point. You can also use [Thinkster Popular Guide](http://www.thinkster.io/), and the [Egghead Videos](https://egghead.io/). @@ -30,9 +30,9 @@ $ sudo npm install -g grunt-cli ``` ## Downloading MEAN.JS -There are several ways you can get the MEAN.JS boilerplate: +There are several ways you can get the MEAN.JS boilerplate: -### Yo Generator +### Yo Generator The recommended way would be to use the [Official Yo Generator](http://meanjs.org/generator.html) which will generate the latest stable copy of the MEAN.JS boilerplate and supplies multiple sub-generators to ease your daily development cycles. ### Cloning The GitHub Repository @@ -73,18 +73,18 @@ $ grunt ``` Your application should run on the 3000 port so in your browser just go to [http://localhost:3000](http://localhost:3000) - -That's it! your application should be running by now, to proceed with your development check the other sections in this documentation. + +That's it! your application should be running by now, to proceed with your development check the other sections in this documentation. If you encounter any problem try the Troubleshooting section. ## 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: @@ -92,7 +92,6 @@ $ fig up $ docker build -t mean . $ docker run -p 27017:27017 -d --name db mongo $ docker run -p 3000:3000 --link db:db_1 mean -$ ``` * To enable live reload forward 35729 port and mount /app and /public as volumes: @@ -101,7 +100,7 @@ $ docker run -p 3000:3000 -p 35729:35729 -v /Users/mdl/workspace/mean-stack/mean ``` ## Getting Started With MEAN.JS -You have your application running but there are a lot of stuff to understand, we recommend you'll go over the [Offical Documentation](http://meanjs.org/docs.html). +You have your application running but there are a lot of stuff to understand, we recommend you'll go over the [Offical Documentation](http://meanjs.org/docs.html). In the docs we'll try to explain both general concepts of MEAN components and give you some guidelines to help you improve your development procees. We tried covering as many aspects as possible, and will keep update it by your request, you can also help us develop the documentation better by checking out the *gh-pages* branch of this repository. ## Community diff --git a/config/env/development.js b/config/env/development.js index 310189454b..c7929f5cf2 100644 --- a/config/env/development.js +++ b/config/env/development.js @@ -1,7 +1,7 @@ 'use strict'; module.exports = { - db: 'mongodb://localhost/mean-dev', + db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean-dev', app: { title: 'MEAN.JS - Development Environment' }, diff --git a/config/env/test.js b/config/env/test.js index dd0c6184cb..d0a4ea97dd 100644 --- a/config/env/test.js +++ b/config/env/test.js @@ -1,8 +1,8 @@ 'use strict'; module.exports = { - db: 'mongodb://localhost/mean-test', - port: 3001, + db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/mean-test', + 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