Add a gitignore, add a dockerfile

This commit is contained in:
JP Schneider 2014-05-25 19:09:12 -05:00
Родитель ddca895d91
Коммит f13d3ad2ba
3 изменённых файлов: 40 добавлений и 12 удалений

Просмотреть файл

@ -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

30
dockerfile Normal file
Просмотреть файл

@ -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

Просмотреть файл

@ -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