diff --git a/bitlbee/Dockerfile b/bitlbee/Dockerfile new file mode 100644 index 000000000..ea87d1628 --- /dev/null +++ b/bitlbee/Dockerfile @@ -0,0 +1,24 @@ +FROM alpine +MAINTAINER Vincent Ambo + +# Install bitlbee packages +RUN apk update && \ + apk add bitlbee bitlbee-otr bitlbee-doc ca-certificates curl gnutls + +# Install stunnel +RUN echo "http://dl-3.alpinelinux.org/alpine/edge/testing/" >> /etc/apk/repositories +RUN apk update && apk add stunnel + +# Add a user for bitlbee +RUN adduser -D bitlbee + +# Add bitlbee configuration +ADD bitlbee.conf /etc/bitlbee/bitlbee.conf +ADD motd.txt /etc/bitlbee/motd.txt + +# Add stunnel configuration +ADD stunnel.conf /etc/bitlbee/stunnel.conf + +EXPOSE 6697 + +CMD bitlbee -F && stunnel /etc/bitlbee/stunnel.conf diff --git a/bitlbee/bitlbee-rc.yaml b/bitlbee/bitlbee-rc.yaml new file mode 100644 index 000000000..676ff0622 --- /dev/null +++ b/bitlbee/bitlbee-rc.yaml @@ -0,0 +1,38 @@ +--- +apiVersion: v1 +kind: ReplicationController +metadata: + name: bitlbee-v1 + labels: + app: bitlbee + spec: v1 +spec: + replicas: 1 + selector: + app: bitlbee + spec: v1 + template: + metadata: + labels: + app: bitlbee + spec: v1 + spec: + containers: + - image: eu.gcr.io/composite-watch-759/bitlbee + imagePullPolicy: Always + name: bitlbee + volumeMounts: + - name: tazj-in-tls + mountPath: /etc/bitlbee/tls + - name: bitlbee-storage + mountPath: /var/lib/bitlbee + ports: + - containerPort: 6697 + volumes: + - name: tazj-in-tls + secret: + secretName: tazj-in-tls + - name: bitlbee-storage + gcePersistentDisk: + pdName: bitlbee-storage + fsType: ext4 diff --git a/bitlbee/bitlbee-svc.yaml b/bitlbee/bitlbee-svc.yaml new file mode 100644 index 000000000..956e02a41 --- /dev/null +++ b/bitlbee/bitlbee-svc.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: bitlbee + labels: + app: bitlbee +spec: + type: LoadBalancer + selector: + app: bitlbee + ports: + - port: 6697 + targetPort: 6697 + name: irc-tls diff --git a/bitlbee/bitlbee.conf b/bitlbee/bitlbee.conf new file mode 100644 index 000000000..0903a991c --- /dev/null +++ b/bitlbee/bitlbee.conf @@ -0,0 +1,11 @@ +[settings] +User = bitlbee +HostName = bitlbee.tazj.in +ConfigDir = /var/lib/bitlbee + +AuthMode = Closed +AuthPassword = md5:sehKBm6gtplh6/K0Dn6DOo0crlRH +OperPassword = md5:lP81y2wzU5pSwOtTEI37ewrSSlda + +[defaults] +private = 1 diff --git a/bitlbee/motd.txt b/bitlbee/motd.txt new file mode 100644 index 000000000..98d8c37d9 --- /dev/null +++ b/bitlbee/motd.txt @@ -0,0 +1,6 @@ +Welcome to tazjin's bitlbee server! + +While this server may appear as if it's open to the public, you are in no way +safe from me reading your communication or randomly terminating the service. + +Use at your own peril, unless you are me. diff --git a/bitlbee/stunnel.conf b/bitlbee/stunnel.conf new file mode 100644 index 000000000..126518f34 --- /dev/null +++ b/bitlbee/stunnel.conf @@ -0,0 +1,9 @@ +setuid = nobody +setgid = nogroup +foreground = yes + +[bitlbee] +accept = 6697 +connect = 6667 +cert = /etc/bitlbee/tls/tls.key +key = /etc/bitlbee/tls/tls.crt