ZNC in a container
Go to file
dave bb93f396e1 Revert "remove cron and base off dpedu/base"
This reverts commit a89cb8d89c.
2016-05-15 16:21:37 -07:00
Dockerfile Revert "remove cron and base off dpedu/base" 2016-05-15 16:21:37 -07:00
README.md Add public logs folder 2015-02-15 10:37:02 -08:00
cron.conf Revert "remove cron and base off dpedu/base" 2016-05-15 16:21:37 -07:00
crontab Add auto-generated channel stats [beta] 2015-01-23 23:37:24 -08:00
default Rate limit authorization requests 2015-02-15 11:21:42 -08:00
nginx.conf Split supervisor config file 2015-05-03 16:25:12 -07:00
pisg.py Show more links in Pisg output 2015-02-16 12:12:56 -08:00
sshd.conf Split supervisor config file 2015-05-03 16:25:12 -07:00
start pass sigterm to supervisor 2015-02-27 15:39:46 -08:00
supervisor.conf Split supervisor config file 2015-05-03 16:25:12 -07:00
znc.conf Split supervisor config file 2015-05-03 16:25:12 -07:00

README.md

Docker ZNC

Suitable for creating docker containers running ZNC. Now with pisg!

Setup

General steps:

  • Install docker
  • Clone this repo, cd in
  • Load it as a template: sudo docker build -t znc .
  • Start a new container: sudo docker run -it -p 666:22 -p 4421:4421 -p 80:80 znc /start
  • Configure znc
  • Find the new container in your list: sudo docker ps -a
  • Run it in the background: sudo docker start mycontainerid

When you first run the image, you'll be presented with two ways to configure znc:

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!!.

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.

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.

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.

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
  • Compile provided ZNC modules into the image
  • Prompt to change ALL default passwords on first start