Skip to content

Commit

Permalink
clean up and a combined nodejs + mongo example
Browse files Browse the repository at this point in the history
  • Loading branch information
kstaken committed Jul 5, 2013
1 parent a5da486 commit f813356
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 9 deletions.
2 changes: 1 addition & 1 deletion couchdb.docker
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Currently installs couchdb 1.3.1

FROM ubuntu
MAINTAINER Kimbro Staken "kstaken@kstaken.com"
MAINTAINER Kimbro Staken

RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list
RUN apt-get -y update
Expand Down
2 changes: 1 addition & 1 deletion docpad.docker
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu
MAINTAINER Kimbro Staken "kstaken@kstaken.com"
MAINTAINER Kimbro Staken

RUN apt-get install -y python-software-properties python
RUN add-apt-repository ppa:chris-lea/node.js
Expand Down
2 changes: 1 addition & 1 deletion mongodb.docker
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Install a more up to date mongodb than what is included in the default ubuntu repositories.

FROM ubuntu
MAINTAINER Kimbro Staken "kstaken@kstaken.com"
MAINTAINER Kimbro Staken

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
Expand Down
23 changes: 23 additions & 0 deletions nodejs-mongodb/Dockerfile
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"]
12 changes: 12 additions & 0 deletions nodejs-mongodb/Supervisorfile
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
2 changes: 1 addition & 1 deletion nodejs.docker
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu
MAINTAINER Kimbro Staken "kstaken@kstaken.com"
MAINTAINER Kimbro Staken

RUN apt-get install -y python-software-properties python
RUN add-apt-repository ppa:chris-lea/node.js
Expand Down
12 changes: 7 additions & 5 deletions rethinkdb-optimized.docker
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@
# connecting you to an already running container.

FROM ubuntu
MAINTAINER Kimbro Staken "kstaken@kstaken.com"
MAINTAINER Kimbro Staken

RUN echo "0.2" > /version

ADD https://raw.github.com/kstaken/dockerfile-examples/master/rethinkdb-install.sh /rethinkdb-install.sh
RUN /bin/bash /rethinkdb-install.sh
#ADD https://raw.github.com/kstaken/dockerfile-examples/master/rethinkdb-install.sh /rethinkdb-install.sh
ADD rethinkdb-install.sh /

#RUN /bin/bash /rethinkdb-install.sh

EXPOSE 8100:8100

ENTRYPOINT ["rethinkdb"]
#ENTRYPOINT ["rethinkdb"]

CMD ["-d", "/var/rethinkdb/db", "--bind", "all", "--http-port", "8100"]
#CMD ["-d", "/var/rethinkdb/db", "--bind", "all", "--http-port", "8100"]

0 comments on commit f813356

Please sign in to comment.