Skip to content

Commit

Permalink
Added Dockerfile to run with Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
samalba committed May 1, 2013
1 parent 0c99171 commit 097dd7d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This file describes how to build hipache into a runnable linux container with all dependencies installed
# To build:
# 1) Install docker (http://docker.io)
# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/hipache < Dockerfile
# 3) Run:
# docker run -p :80 -p :6379 -d $USER/hipache supervisord -n
# redis-cli
#
# VERSION 0.1
# DOCKER-VERSION 0.1.6

from ubuntu:12.04
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get -y update
run apt-get -y install wget git redis-server supervisor
run wget -O - http://nodejs.org/dist/v0.8.23/node-v0.8.23-linux-x64.tar.gz | tar -C /usr/local/ --strip-components=1 -zxv
run npm install hipache -g
run mkdir -p /var/log/supervisor
copy supervisord.conf /etc/supervisor/conf.d/supervisord.conf
14 changes: 14 additions & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[supervisord]
nodaemon=true

[program:hipache]
command=/usr/local/bin/hipache -c /usr/local/lib/node_modules/hipache/config/config_dev.json
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
autorestart=true

[program:redis]
command=/usr/bin/redis-server
stdout_logfile=/var/log/supervisor/%(program_name)s.log
stderr_logfile=/var/log/supervisor/%(program_name)s.log
autorestart=true

0 comments on commit 097dd7d

Please sign in to comment.