-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up and a combined nodejs + mongo example
- Loading branch information
Showing
7 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM ubuntu | ||
MAINTAINER Kimbro Staken | ||
|
||
RUN apt-get install -y python-software-properties python python-setuptools ruby rubygems | ||
RUN add-apt-repository ppa:chris-lea/node.js | ||
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list | ||
RUN apt-get update | ||
RUN apt-get install -y nodejs | ||
|
||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | ||
RUN echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list | ||
RUN apt-get -y update | ||
RUN apt-get -y install mongodb-10gen | ||
|
||
RUN easy_install supervisor | ||
RUN echo_supervisord_conf > /etc/supervisord.conf | ||
RUN printf "[include]\nfiles = /var/www/Supervisorfile\n" >> /etc/supervisord.conf | ||
|
||
ADD . /var/www | ||
|
||
RUN cd /var/www ; npm install | ||
|
||
CMD ["/usr/local/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[program:mongodb] | ||
command=/usr/bin/mongod --config /etc/mongodb.conf | ||
numprocs=1 | ||
autostart=true | ||
autorestart=true | ||
|
||
[program:node] | ||
command=/usr/bin/node /var/www/app.js | ||
numprocs=1 | ||
directory=/var/www/ | ||
autostart=true | ||
autorestart=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters