From d2bcaecce95dc5c545ad01aad61077c87fae1a12 Mon Sep 17 00:00:00 2001 From: David Hudson Date: Sat, 19 Mar 2016 14:40:52 -0700 Subject: [PATCH] Add Dockerfile --- .gitignore | 1 + Dockerfile | 29 +++++++++++++++++++++++++++++ README.md | 13 ++++++++++++- start.sh | 4 ++++ 4 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 start.sh diff --git a/.gitignore b/.gitignore index 13bbe69fd..f846571de 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ architecture.json node_modules storage .idea +*.swp diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..840cbd386 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM node:latest + +MAINTAINER David Hudson + +# System update +RUN apt-get -q -y update + +RUN apt-get -q -y install npm +RUN apt-get -q -y install mongodb + +RUN apt-get clean && rm -r /var/lib/apt/lists/* + +EXPOSE 22 +EXPOSE 8000 + +ADD start.sh /start.sh +RUN chmod +x /start.sh + +VOLUME ["/opt/apps"] +COPY . /opt/apps/naturalcrit/ +WORKDIR /opt/apps/naturalcrit/ + +RUN npm install +RUN npm install -g gulp-cli +RUN npm install gulp +RUN gulp fresh + +CMD ["/start.sh"] + diff --git a/README.md b/README.md index c414271a8..bd3e8f8d0 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,18 @@ A tool suite for DMs to use for D&D Have fun! +### Docker Image +You can use [Docker](https://docs.docker.com) to get up and running with NaturalCrit. + +1. Install Docker +1. Clone the repo +1. In the terminal, go to the repo +1. Build the docker image `docker build -t naturalcrit .` +1. Run the docker container `docker run -dit -p 8000:8000 naturalcrit` +1. You can check out the website on your computer on port 8000 + 1. You may have to use `docker-machine env` to get the IP address of your docker instance + ### changelog -You can check out the changelog [here](https://github.com/stolksdorf/NaturalCrit/blob/master/changelog.md) \ No newline at end of file +You can check out the changelog [here](https://github.com/stolksdorf/NaturalCrit/blob/master/changelog.md) diff --git a/start.sh b/start.sh new file mode 100644 index 000000000..083c1beba --- /dev/null +++ b/start.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd /opt/apps/naturalcrit/ +/usr/bin/mongod --config /etc/mongodb.conf & +gulp