add stunnel to support tls connection for atheme

This commit is contained in:
paige 2025-01-04 05:35:54 +00:00
parent 877a4607a5
commit 4fddb66e44
3 changed files with 39 additions and 0 deletions

11
stunnel/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
ARG UBUNTU_VERSION="noble"
FROM ubuntu:${UBUNTU_VERSION}
RUN apt -y update
RUN apt -y install stunnel
ADD stunnel.conf /etc/stunnel/stunnel.conf
CMD stunnel

View File

@ -0,0 +1,20 @@
services:
stunnel:
restart: on-failure:3
build:
context: .
image: stunnel
network_mode: "host"
volumes:
- ../custom/ca.crt:/ca.crt:ro
- ../custom/server.crt:/server.crt:ro
- ../custom/server.key:/server.key:ro
- ./stunnel.conf:/etc/stunnel/stunnel.conf:ro
ulimits:
nofile:
soft: "102400"
hard: "102400"
logging:
driver: "json-file"
options:
max-size: "64k"

8
stunnel/stunnel.conf Normal file
View File

@ -0,0 +1,8 @@
foreground = yes
[certificate-based server]
accept = 0.0.0.0:7777
connect = 127.0.0.1:6000
cert = /server.crt
key = /server.key
#verifyPeer = yes
CAfile = /ca.crt