Feat: add TLS termination via bitlbee

Fixes #6
This commit is contained in:
Michele Bologna
2020-04-18 12:59:20 +02:00
parent c9bd1b6cad
commit f11fce3f4a
2 changed files with 64 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
## Features
In addition to the [Bitlbee's out of the box supported protocols](https://wiki.bitlbee.org/), this container also supports the following protocols:
* In addition to the [Bitlbee's out of the box supported protocols](https://wiki.bitlbee.org/), this container also supports the following protocols:
- Skype via [skype4pidgin](https://github.com/EionRobb/skype4pidgin)
- Telegram via [telegram-purple](https://github.com/majn/telegram-purple)
@@ -15,25 +15,48 @@ In addition to the [Bitlbee's out of the box supported protocols](https://wiki.b
- Mattermost via [puple-mattermost](https://github.com/EionRobb/purple-mattermost)
- Instagram via [purple-instagram](https://github.com/EionRobb/purple-instagram)
* The `docker-compose.yml` provided in this repository enables bitlbee to be TLS terminated via [stunnel](https://www.stunnel.org/).
## Usage
1. Clone the project:
git clone https://www.github.com/mbologna/docker-bitlbee
% git clone https://www.github.com/mbologna/docker-bitlbee
2. (Optional) Customize bitlbee configuration file in `etc/bitlbee/bitlbee.conf`
3. Run bitlbee via:
3. Start `bitlbee` either via:
a. [Docker Compose](https://docs.docker.com/compose/install/):
* [Docker Compose](https://docs.docker.com/compose/install/) (recommended):
docker-compose up
```
% docker-compose up
```
b. or via Docker:
* Docker:
docker volume create bitlbee_data
docker run -d --name bitlbee -p 16667:6667 --restart=always -v $PWD/etc/bitlbee:/usr/local/etc/bitlbee mbologna/docker-bitlbee
```
% docker volume create bitlbee_data
% docker run -d --name bitlbee \
--restart=always \
-p 16667:6667 \
-v $PWD/etc/bitlbee:/usr/local/etc/bitlbee \
mbologna/docker-bitlbee
% docker run -d --name bitlbee-stunnel \
--restart=always \
--link bitlbee:bitlbee
-e STUNNEL_SERVICE=bitlbee-stunnel \
-e STUNNEL_ACCEPT=6697 \
-e STUNNEL_CONNECT=bitlbee:6667 \
-p 16697:6697 \
dweomer/stunnel
```
4. Connect your IRC client either to:
* localhost:16697 (TLS terminated) (recommended)
* localhost:16667 (non-TLS, plain connection)
## Building
You can build a bitlbee image from Dockerfile: `docker build -t="mbologna/docker-bitlbee" github.com/mbologna/docker-bitlbee`
You can build a `bitlbee` image from Dockerfile: `docker build -t="mbologna/docker-bitlbee" github.com/mbologna/docker-bitlbee`

View File

@@ -1,17 +1,35 @@
version: "2.0"
services:
app:
bitlbee:
build: .
image: mbologna/docker-bitlbee
container_name: bitlbee
restart: always
ports:
- "16667:6667"
network_mode: bridge
networks:
- bitlbee
volumes:
- ./etc/bitlbee:/usr/local/etc/bitlbee
- bitlbee_data:/var/lib/bitlbee
stunnel:
image: dweomer/stunnel
container_name: bitlbee-stunnel
restart: always
networks:
- bitlbee
ports:
- "16697:6697"
environment:
- STUNNEL_SERVICE=bitlbee-stunnel
- STUNNEL_ACCEPT=6697
- STUNNEL_CONNECT=bitlbee:6667
depends_on:
- bitlbee
volumes:
bitlbee_data:
networks:
bitlbee: