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