Files
hassio-addons/battybirdnet-pi/rootfs/helpers/caddy_ingress.sh
2024-07-25 07:10:19 +00:00

25 lines
518 B
Bash
Executable File

#!/bin/bash
# shellcheck shell=bash
# Get values
source /etc/birdnet/birdnet.conf
# Create ingress configuration for Caddyfile
cat << EOF >> /etc/caddy/Caddyfile
:8082 {
root * ${EXTRACTED}
file_server browse
handle /By_Date/* {
file_server browse
}
handle /Charts/* {
file_server browse
}
reverse_proxy /stream localhost:8000
php_fastcgi unix//run/php/php-fpm.sock
reverse_proxy /log* localhost:8080
reverse_proxy /stats* localhost:8501
reverse_proxy /terminal* localhost:8888
}
EOF