Skip to content

Commit

Permalink
Remove supervisord from docker image. Update setup.py.
Browse files Browse the repository at this point in the history
Use setup.py for installing hamper.
  • Loading branch information
chancez committed Jan 30, 2014
1 parent cfd5958 commit 796447b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ build/
/_trial_temp*/
hamper.acl
/man/

dist/
hamper.egg-info/
16 changes: 4 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@ RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt
RUN apt-get update
RUN apt-get upgrade -y

RUN apt-get install -y openssh-server supervisor python-dev build-essential python-pip
RUN mkdir -p /var/run/sshd
RUN mkdir -p /var/log/supervisor

# Change the root password to "password"
RUN echo 'root:password' | chpasswd
RUN apt-get install -y build-essential python-dev python-pip

# Add our directory and the supervisor config to the proper locations
ADD . /hamper
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
WORKDIR /hamper

# Dont need postgres adapater
RUN sed -i '/psycopg/d' /hamper/requirements.txt
RUN pip install -r /hamper/requirements.txt

RUN python setup.py install

EXPOSE 22
CMD ["/usr/bin/supervisord"]
CMD ["./scripts/hamper"]
10 changes: 2 additions & 8 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,5 @@ To begin, start by copying the `hamper.conf.dist` into `hamper.conf` and adjusti
settings as necessary. Then all you need to do is run `docker build -t <yourname>/hamper .`
and you that will build a new Docker image to be used.

To use this container run `docker run -p 22 -t -i <yourname>/hamper`, this will
startup hamper and sshd on the container using supervisord. You can ssh to the
container by running the following command:

`ssh root@localhost -p $(docker port $(docker ps -q | head -n 1) 22 | cut -d":" -f2)`

The password is `password`. You can then use supervisorctl to check the status of
hamper and to restart/manage the process running.
To use this container run `docker run -t -i <yourname>/hamper`, this will
startup hamper in the container.
24 changes: 14 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@

from hamper import version

setup(name='hamper',
version=version.encode('utf8'),
description='Yet another IRC bot',
install_requires=['pyyaml', 'Twisted', 'SQLAlchemy'],
author='Mike Cooper',
author_email='mythmon@gmail.com',
url='https://www.github.com/hamperbot/hamper',
packages=find_packages(),
scripts=['scripts/hamper'],
)
requires = open('requirements.txt').read().split('\n')
requires = [dep for dep in requires if 'psycopg' not in dep]

setup(
name='hamper',
version=version.encode('utf8'),
description='Yet another IRC bot',
install_requires=requires,
author='Mike Cooper',
author_email='mythmon@gmail.com',
url='https://www.github.com/hamperbot/hamper',
packages=find_packages(),
scripts=['scripts/hamper'],
)
13 changes: 0 additions & 13 deletions supervisord.conf

This file was deleted.

0 comments on commit 796447b

Please sign in to comment.