Last active
December 17, 2015 17:29
-
-
Save zgohr/5646599 to your computer and use it in GitHub Desktop.
MongoDB/Strider Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# docker run $USER/strider strider addUser | |
# -e SERVER_NAME= | |
# -e DB_URI= | |
# -e GITHUB_APP_ID= | |
# -e GITHUB_APP_SECRET= | |
# -e SMTP_HOST= | |
# -e SMTP_PORT= | |
# -e SMTP_USER= | |
# -e SMTP_PASS= | |
# docker run -p 3000 -d $USER/strider supervisord -n | |
from ubuntu:12.04 | |
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
run apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
run echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee /etc/apt/sources.list.d/10gen.list | |
# Hack: force initctl to return true for upstart connection | |
# refused issue https://github.com/dotcloud/docker/issues/483 | |
# Due to this, we cannot use upstart to run the Mongo daemon | |
run dpkg-divert --local --rename --add /sbin/initctl | |
run ln -s /bin/true /sbin/initctl | |
run apt-get -y update | |
run apt-get -y install apt-utils wget git mongodb-10gen make build-essential supervisor | |
run echo "noprealloc = true" >> /etc/mongodb.conf | |
run echo "smallfiles = true" >> /etc/mongodb.conf | |
run echo "[supervisord]" > /etc/supervisor/conf.d/supervisord.conf | |
run echo "nodaemon=true" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "[program:monodb]" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "user=mongodb" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "command=mongod -f /etc/mongodb.conf" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "stdout_logfile=/var/log/supervisor/%(program_name)s.log" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "stderr_logfile=/var/log/supervisor/%(program_name)s.log" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "autorestart=true" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "[program:strider]" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "command=strider" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "stdout_logfile=/var/log/supervisor/%(program_name)s.log" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "stderr_logfile=/var/log/supervisor/%(program_name)s.log" >> /etc/supervisor/conf.d/supervisord.conf | |
run echo "autorestart=true" >> /etc/supervisor/conf.d/supervisord.conf | |
run wget -O - http://nodejs.org/dist/v0.10.8/node-v0.10.8-linux-x64.tar.gz | tar -C /usr/local/ --strip-components=1 -zxv | |
run mkdir -p /home/dotcloud | |
run git clone https://github.com/Strider-CD/strider.git /home/dotcloud/current; cd /home/dotcloud/current | |
run npm install | |
run ln -s /home/dotcloud/current/bin/strider /usr/bin/strider |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment