Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# start from centos -- we all know why
FROM centos:centos7

# install nodejs
RUN yum install -y http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
RUN yum install -y nodejs npm

# let's install mongodb
RUN yum -y update; yum clean all
RUN yum -y install epel-release; yum clean all
RUN yum -y install mongodb-server; yum clean all
RUN mkdir -p /data/db

# Let's have the mongodb available from the outside, shall we
EXPOSE 27017
CMD ["/usr/bin/mongod"]

# Bundle app source
COPY . ./
# Install app dependencies
RUN cd ./; npm install

# let's use the PORT we've been using up to now
EXPOSE 1337

# and start the app
CMD ["/usr/bin/node", "app.js"]