#!/bin/bash # Caddy als Reverse-Proxy mit Cache; für die Tirreno API # https://docs.souin.io/docs/storages/redis/ wget https://github.com/caddyserver/xcaddy/releases/download/v0.4.5/xcaddy_0.4.5_linux_amd64.deb apt install -y ./xcaddy_0.4.5_linux_amd64.deb golang redis-server xcaddy build \ --with github.com/darkweak/souin/plugins/caddy \ --with github.com/darkweak/storages/redis/caddy mv caddy /usr/bin/ cat < Caddyfile :80 { cache { allowed_http_verbs GET POST ttl 86400s redis { url 127.0.0.1:6379 } } reverse_proxy https://api.tirreno.com:443 } EOF caddy run