From 85a3e6a2ae530a2ac65df472ac4937372d0fc303 Mon Sep 17 00:00:00 2001 From: Jash Sayani Date: Sun, 31 Jan 2016 22:36:44 -0800 Subject: [PATCH] Added Dockerfile --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..5bd2a6cc57 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# Start with a node image +FROM node + +# Install MongoDB +RUN apt-get update +RUN apt-get -y install mongodb +CMD ["/usr/bin/mongod", "--config", "/etc/mongodb.conf"] + +# Setup project directory +RUN mkdir -p /usr/app +COPY . /usr/app +WORKDIR /usr/app + +# Install all node_modules +RUN npm install + +# Setup env variables passed along with `docker run` +ENV APP_ID myAppId +ENV MASTER_KEY mySecretMasterKey +ENV FILE_KEY optionalFileKey + +# Expose the ports from Docker container to the VM +EXPOSE 8080 27017 + +# We run index.js, but you should update this to the main +# file defined in `main` in package.json +CMD node index.js