<commit_before>```yaml
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-nginx,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
```<commit_msg>Improved README<commit_after># HTTP/HTTPS reverse proxy based on NGINX and Let's Encrypt

Simple HTTP proxy based on NGINX which automatically does this for you:
1. redirects from HTTP to HTTPS
1. obtains needed certificates vie Let's Encrypt
1. renews near-to-expire certificates

It's configured vie `RULES` variable which uses format `{domain}>{host[:port]}` separated by `,`.

## Example for Kubernetes

```yaml
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
```

```yaml
apiVersion: v1
kind: Service
metadata:
  name: catalog-reverse-proxy
  labels:
    app: catalog
    service: reverse-proxy
spec:
  selector:
    app: catalog
    service: reverse-proxy
  ports:
    - name: http
      protocol: TCP
      port: 80
    - name: https
      protocol: TCP
      port: 443
  externalIPs:
    - 172.16.17.32
```
{'fraction_non_alphanumeric': 0.0846774193548387, 'fraction_numerical': 0.010080645161290322, 'mean_word_length': 2.1889460154241647, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7242133', 'n_tokens_mistral': 781, 'n_tokens_neox': 748, 'n_words': 204}