docker-znc/README.md

61 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

2015-01-24 20:03:13 -08:00
Docker ZNC
==========
2015-01-06 19:15:39 -08:00
Suitable for creating docker containers running ZNC. Now with pisg!
2015-01-06 19:15:39 -08:00
2015-01-24 20:03:13 -08:00
Setup
=====
2015-01-06 19:15:39 -08:00
**General steps:**
2016-05-26 20:14:27 -07:00
* Build image: `docker build -t znc .`
* Run container: `docker run -it -p 8022:22 -p 6667:6667 -p 80:80 znc /start`
* Configure znc
2016-05-26 20:14:27 -07:00
* Find the new container in your list: `docker ps -a`
* Run it in the background: `docker start mycontainer`
If you wish to preserve data outside the container, mount:
* `-v /host/znc/ssh_keys:/etc/ssh/keys`
* `-v /host/znc/zncdata:/srv/znc`
2015-01-06 19:15:39 -08:00
When you first run the image, you'll be presented with two ways to configure znc:
2015-01-24 20:03:13 -08:00
Set up a new znc instance
=========================
If no import of existing znc data is available, the znc configuration will run. Set it up as needed; the port znc listens on must be exposed in the command used to start the container (-p 4421:4421 above). The final question asks if you want to start znc, **choose `NO`!!**.
2015-01-24 20:03:13 -08:00
Import an existing znc instance's configuration
===============================================
You may migrate an existing ZNC instance into this container by providing a tarball of the source .znc directory. The tarball should contain the .znc directory, only, with everything inside it. The start script will prompt you to insert the .tar.gz file.
2015-01-24 20:03:13 -08:00
Pisg
====
This container creates [pisg]-style channel statistics ([example]) for any ZNC users with the "log" module enabled. The stats are regenerated nightly and nginx serves the files on port 80 with a directory structure like this:
* znc username
* znc network name
* \#channelname.html
The channel information is private, nginx is configured with HTTP basic authentication; the password is prompted for during setup.
2015-02-15 10:25:32 -08:00
Individual channel statistic files can be made public by symlinking each, for example, to /home/znc/pisg/output/.pub/mychannel.html, which is public at http://server-ip/pub/mychannel.html. Directory listing for /pub/ is disabled.
2015-01-24 20:03:13 -08:00
TODO
====
* Ensure pisg cache files don't use too much disk space (/home/znc/pisg/cache)
* If this is a problem, maybe tar/gz channel groups and extract when necessary when running pisg
* Provide a way to make certain channel stat files public
* Provide a way to share channel files with secret links
* Provide all-time, yearly, and monthly pisg outputs
2015-01-24 12:29:23 -08:00
* Compile provided ZNC modules into the image
2015-01-24 12:32:37 -08:00
* Prompt to change ALL default passwords on first start
[pisg]:http://pisg.sourceforge.net/
[example]:http://pisg.sourceforge.net/examples