HTTP/HTTPS reverse proxy based on NGINX and Let's Encrypt
3.1K
Simple HTTP proxy based on NGINX which automatically does this for you:
It's configured via RULES variable which uses format {domain}>{host[:port]} separated by ,.
You can also modify:
IGNORE_LETS_ENCRYPT_ALL_ERRORS to (un)ignore all Let's Encrypt errorsIGNORE_LETS_ENCRYPT_OBTAIN_ERRORS to (un)ignore Let's Encrypt errors during obtaining new certificateIGNORE_LETS_ENCRYPT_RENEW_ERRORS to (un)ignore Let's Encrypt errors during renewing old certificatesDEFAULT_SITE to set up default siteUPSTREAMS to set load balancingPROXY_ADDITIONAL_OPTIONS to expand proxy settingsPROXY_HEADERS to override proxy headersPROXY_OPTIONS to override proxy optionsFor more information see Dockerfile.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: reverse-proxy
labels:
app: reverse-proxy
spec:
replicas: 1
selector:
matchLabels:
app: reverse-proxy
template:
metadata:
labels:
app: reverse-proxy
spec:
containers:
- name: reverse-proxy
image: petrknap/letsencrypt-nginx-reverse-proxy:latest
env:
- name: RULES
value: petrknap.cz>web-apache,mail.petrknap.cz>mail-nginx
volumeMounts:
- name: reverse-proxy-letsencrypt
mountPath: /etc/letsencrypt
volumeClaimTemplates:
- metadata:
name: reverse-proxy-letsencrypt
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi # it needs only few MiBs but providers usually don't allow to allocate less than 1 GiB
apiVersion: v1
kind: Service
metadata:
name: reverse-proxy
labels:
app: reverse-proxy
spec:
selector:
app: reverse-proxy
ports:
- name: http
protocol: TCP
port: 80
- name: https
protocol: TCP
port: 443
externalIPs:
- 1.2.3.4
Content type
Image
Digest
sha256:d75d93b0e…
Size
86 MB
Last updated
over 1 year ago
docker pull petrknap/letsencrypt-nginx-reverse-proxy