diff --git a/README.md b/README.md index 92e15d7..fa90924 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ from www.yourdomain.com, we would add the following block in config.json: # RUNNING THIS APPLICATION -Simply run node ./bin/server.js +Simply run: + node ./bin/server.js # FURTHER INFORMATION @@ -38,7 +39,7 @@ Bugs/Requests: https://www.github.com/mozilla/http_helper/issues newrelic.js or config settings and it will just work. * Messina is an amazing GELF log utility written by Brian Brennan (brianloveswords). To output -to your own GELF facility, set the following env variables +to your own GELF facility, set the following env variables while running node. export GRAYLOG_HOST="address.to_your_logging_server.com" #defaults to localhost export GRAYLOG_PORT=12201 #defaults to 12201 diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..cfcf23b --- /dev/null +++ b/dockerfile @@ -0,0 +1,30 @@ +from ubuntu:12.04 + +ENV DEBIAN_FRONTEND noninteractive + +# Add repos for base packages +RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise main" >> /etc/apt/sources.list +RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ precise main" >> /etc/apt/sources.list +RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise-updates main" >> /etc/apt/sources.list +RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ precise-updates main" >> /etc/apt/sources.list +RUN echo "deb http://archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list +RUN echo "deb-src http://archive.ubuntu.com/ubuntu/ precise universe" >> /etc/apt/sources.list + +# Add repo for nodejs +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv C7917B12 +RUN echo 'deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu precise main' | tee /etc/apt/sources.list.d/chrislea.list + +# Update and install all of the things +RUN apt-get update +RUN apt-get install -y nodejs openjdk-7-jre-headless + +# Clone our app +RUN git clone https://github.com/mozilla/http_helper.git + +# Run npm install on our app +cd ~/http_helper && npm install + +# Settings for starting up +EXPOSE 80 + +CMD /usr/bin/node ~/http_helper/bin/server.js diff --git a/package.json b/package.json index 58c4da9..8728abc 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "mofo_http_manipulator", + "name": "http_helper", "version": "0.0.3", "author": "JP Schneider jdotpz", - "description": "A http manipulator cobbled together for use in MoFo infra, with code from git://github.com/pksunkara/node-redirect.git", + "description": "A http helper cobbled together for use in MoFo infra", "main": "", "repository": { "type": "git", - "url": "git://github.com/jdotpz/mofo_http_manipulator.git" + "url": "git://github.com/mozilla/http_helper.git" }, "keywords": [ "redirect", @@ -15,13 +15,10 @@ "proxy", "http" ], - "homepage": "http://github.com/jdotpz/mofo_http_manipulator", - "scripts": { - "start": "./server" - }, + "homepage": "http://github.com/mozilla/http_helper", "contributors": [ { - "name": "JP Schneider, Pavan Kumar Sunkara, Pomax", + "name": "JP Schneider, Pomax", "email": "jp@mozillafoundation.org" } ], @@ -37,12 +34,12 @@ "node": ">=0.6" }, "bugs": { - "url": "https://github.com/jdotpz/mofo_http_manipulator/issues" + "url": "https://github.com/mozilla/http_helper/issues" }, "licenses": [ { "type": "MIT", - "url": "https://github.com/pksunkara/node-redirect/raw/master/LICENSE" + "url": "https://github.com/mozilla/http_helper/raw/master/LICENSE" } ], "analyze": false