Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit a68b588

Browse files
committed
first docker version with fig
1 parent 9da3bc8 commit a68b588

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Note "> /dev/null" workaround for fig-bug https://github.com/orchardup/fig/issues/239
3+
#
4+
FROM dockerfile/nodejs
5+
6+
MAINTAINER Matthias Luebken, [email protected]
7+
8+
WORKDIR /home/mean
9+
10+
# Install Mean.JS Prerequisites
11+
RUN npm install -g grunt-cli > /dev/null
12+
RUN npm install -g bower > /dev/null
13+
14+
# Install Mean.JS packages
15+
ADD package.json /home/mean/package.json
16+
RUN npm install > /dev/null
17+
18+
# Make everything available for start
19+
ADD . /home/mean
20+
21+
# currently only works for development
22+
ENV NODE_ENV development
23+
24+
EXPOSE 3000
25+
CMD ["grunt"]

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ Your application should run on the 3000 port so in your browser just go to [http
7777
That's it! your application should be running by now, to proceed with your development check the other sections in this documentation.
7878
If you encounter any problem try the Troubleshooting section.
7979

80+
## Development and deployment With Docker
81+
82+
* Install [Docker](http://www.docker.com/)
83+
* Install [Fig](https://github.com/orchardup/fig)
84+
85+
* For local development and testing:
86+
```
87+
$ fig up
88+
```
89+
90+
8091
## Getting Started With MEAN.JS
8192
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).
8293
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.

config/env/development.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
'use strict';
22

3+
var DB_HOST = process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost';
4+
35
module.exports = {
4-
db: 'mongodb://localhost/mean-dev',
6+
db: 'mongodb://' + DB_HOST + '/mean-dev',
57
app: {
68
title: 'MEAN.JS - Development Environment'
79
},

fig.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
web:
2+
build: .
3+
links:
4+
- db
5+
ports:
6+
- "3000:3000"
7+
db:
8+
image: mongo
9+
ports:
10+
- "27017:27017"

0 commit comments

Comments
 (0)