Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile fix #135

Merged
merged 2 commits into from
Apr 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 31 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,34 @@
# 1) Install docker (http://docker.io)
# 2) Clone hipache repo if you haven't already: git clone https://github.com/dotcloud/hipache.git
# 3) Build: cd hipache && docker build .
# 4) Run:
# docker run -d <imageid>
# redis-cli
#
# VERSION 0.2
# DOCKER-VERSION 0.4.0

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.10.25/node-v0.10.25-linux-x64.tar.gz | tar -C /usr/local/ --strip-components=1 -zxv
run npm install hipache -g
run mkdir -p /var/log/supervisor
add ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
add ./config/config_dev.json /usr/local/lib/node_modules/hipache/config/config_dev.json
add ./config/config_test.json /usr/local/lib/node_modules/hipache/config/config_test.json
add ./config/config.json /usr/local/lib/node_modules/hipache/config/config.json
expose 80
expose 6379
cmd ["supervisord", "-n"]
# 4) Run: docker run -d <imageid>
# See the documentation for more details about how to operate Hipache.

# Latest Ubuntu LTS
from ubuntu:14.04

# Update
run apt-get -y update

# Install supervisor, node, npm and redis
run apt-get -y install supervisor nodejs npm redis-server

# Manually add hipache folder
run mkdir ./hipache
add . ./hipache

# Then install it
run npm install -g ./hipache --production

# This is provisional, as we don't honor it yet in hipache
env NODE_ENV production

# Add supervisor conf
add ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Expose hipache and redis
expose 80
expose 6379

# Start supervisor
cmd ["supervisord", "-n"]
1 change: 1 addition & 0 deletions supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ stderr_logfile=/var/log/supervisor/%(program_name)s.log
autorestart=true

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