Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 7 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
FROM ubuntu:16.04
FROM python:2

EXPOSE 6667 27017

RUN apt-get update -qq
RUN apt-get install -qqy \
git \
mongodb \
ngircd \
openssl \
libssl-dev \
python-dev \
python-pip \
python-setuptools \
libffi6 \
libffi-dev

ADD . /opt/helga
WORKDIR /opt/helga

RUN sed -i -s 's/^bind_ip = 127.0.0.1/#bind_ip = 127.0.0.1/' /etc/mongodb.conf && service mongodb restart

RUN pip install --upgrade pip
RUN pip install service_identity

RUN cd /opt/helga && python setup.py install
ADD . /helga
WORKDIR /helga

RUN pip install . tox
RUN tox
RUN pip list -o

ENTRYPOINT ["/usr/local/bin/helga"]
CMD ["--settings=settings-docker.py"]
31 changes: 31 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
version: '3'

services:

irc:
image: yrpri/ngircd
ports:
- 6667:6667

mongo:
image: mongo:3
ports:
- 27017:27017
volumes:
- mongo_data:/data/db

helga:
build: .
#image: bigjust/helga
#command: --settings=settings-docker.py
environment:
- HELGA_IRC_SERVER=irc
- HELGA_MONGO_HOST=mongo
volumes:
- .:/helga
depends_on:
- mongo
- irc

volumes:
mongo_data:
21 changes: 21 additions & 0 deletions settings-docker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import os


NICK = os.environ.get('HELGA_NICK', 'helga')

SERVER = {
'TYPE': 'irc',
'HOST': os.environ.get('HELGA_IRC_SERVER', 'localhost'),
'PORT': 6667,
'SSL': False,
}

CHANNELS = [
('#helga-dev',),
]

DATABASE = {
'HOST': os.environ.get('HELGA_MONGO_HOST', 'mongo'),
'PORT': 27017,
'DB': os.environ.get('HELGA_MONGO_DB', 'helga'),
}