Initial commit

This commit is contained in:
paul 2018-12-08 13:50:44 +01:00 committed by Hive
commit 8d31bf8340
3 changed files with 66 additions and 0 deletions

18
Dockerfile Normal file
View file

@ -0,0 +1,18 @@
FROM debian:stretch
MAINTAINER none
RUN \
apt-get update \
&& apt-get install --yes python git python-pip libssl-dev libbz2-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& pip install zeroc-ice
ADD bin/start.sh /tmp/start.sh
RUN chmod 755 /tmp/start.sh
VOLUME ["/data"]
RUN git clone https://github.com/mumble-voip/mumo.git
WORKDIR /mumo
CMD ["/tmp/start.sh"]

23
README.md Normal file
View file

@ -0,0 +1,23 @@
## Mumble-moderator ("mumo")
Mumble Moderator is a python interface to moderate Mumble
### Building mumo
```
docker build -t zombi/mumble-moderator .
```
### Running the mumo
Mumo needs to attach to a running mumble server, in order to work properly.
We usually do this by directly attaching the networks of both containers to
each other, like this:
```
docker run -d \
--name mumo \
-v /data/mumo:/data \
-v /etc/localtime:/etc/localtime:ro \
--net="container:mumble" \
zombi/mumo
```

25
bin/start.sh Normal file
View file

@ -0,0 +1,25 @@
#!/bin/bash
if [ ! -f /data/mumo.ini ]
then
cp /mumo/mumo.ini /data
sed -i 's/mumo.log/\/data\/mumo.log/' /data/mumo.ini
sed -i 's/modules\//\/data\/modules\//' /data/mumo.ini
sed -i 's/modules-enabled\//\/data\/modules-enabled\//' /data/mumo.ini
chmod a+rw /data/mumo.ini
cp -r /mumo/modules-available /data
mkdir -p /data/modules-enabled
echo Created mumo default config data. Exiting.
exit 1
fi
# Mumo apparently refuses to read config from mounted dirs,
# so we copy them ...
cp -r /data/mumo.ini /mumo
cp -r /data/modules /mumo # TODO: Add from git
cp -r /data/modules-available /mumo
cp -r /data/modules-enabled /mumo
exec /mumo/mumo.py