restreamer setup

This commit is contained in:
m3tam3re
2025-03-15 14:23:47 +01:00
parent 779473317d
commit e93bdf20a3
6 changed files with 50 additions and 49 deletions

View File

@ -5,7 +5,7 @@
./littlelink.nix
./matomo.nix
./n8n.nix
# ./restreamer.nix
./restreamer.nix
./slash.nix
];
system.activationScripts.createPodmanNetworkWeb = lib.mkAfter ''

View File

@ -11,7 +11,7 @@
MYSQL_DATABASE = "matomo";
PHP_MEMORY_LIMIT = "2048M";
};
extraOptions = ["--add-host=mysql:10.89.0.1" "--ip=10.89.0.15" "--network=web"];
extraOptions = ["--add-host=mysql:10.89.0.1" "--ip=10.89.0.16" "--network=web"];
};
# Traefik configuration specific to ghost
services.traefik.dynamicConfigOptions.http = {
@ -21,13 +21,23 @@
}
];
routers.matomo = {
rule = "Host(`stats.nemoti.com`)";
tls = {
certResolver = "godaddy";
routers = {
matomo-nemoti = {
rule = "Host(`stats.nemoti.com`)";
tls = {
certResolver = "godaddy";
};
service = "matomo";
entrypoints = "websecure";
};
matomo-m3tam3re = {
rule = "Host(`stats.m3tam3re.com`)";
tls = {
certResolver = "godaddy";
};
service = "matomo";
entrypoints = "websecure";
};
service = "matomo";
entrypoints = "websecure";
};
};
}

View File

@ -4,31 +4,18 @@
environmentFiles = [config.age.secrets.restreamer-env.path];
# Modified ports to include RTMPS
ports = [
"127.0.0.1:3006:8080"
"127.0.0.1:1935:1935"
"127.0.0.1:1945:1945"
"127.0.0.1:3006:8080" # Web UI
"127.0.0.1:1936:1935" # RTMP
];
volumes = [
"restreamer_data:/core/data"
"restreamer_config:/core/config"
];
volumes = ["restreamer_data:/restreamer/db"];
extraOptions = ["--add-host=postgres:10.89.0.1" "--ip=10.89.0.13" "--network=web"];
};
# Traefik configuration
services.traefik = {
# Add static configuration for entry points
staticConfigOptions = {
entryPoints = {
websecure = {
address = ":443";
};
rtmp = {
address = ":1935";
};
rtmps = {
address = ":1945";
};
};
};
dynamicConfigOptions = {
http = {
services.restreamer.loadBalancer.servers = [
@ -51,12 +38,12 @@
services = {
rtmp-service.loadBalancer.servers = [
{
address = "localhost:1935";
address = "localhost:1936";
}
];
rtmps-service.loadBalancer.servers = [
{
address = "localhost:1945";
address = "localhost:1936";
}
];
};

View File

@ -9,7 +9,9 @@
initialScript = pkgs.writeText "initial-script.sql" ''
CREATE USER 'ghost'@'10.89.%' IDENTIFIED BY 'ghost';
GRANT ALL PRIVILEGES ON ghost.* TO 'ghost'@'10.89.%';
'';
CREATE USER 'matomo'@'10.89.%' IDENTIFIED BY 'matomo';
GRANT ALL PRIVILEGES ON matomo.* TO 'matomo'@'10.89.%'; '';
};
services.mysqlBackup = {
enable = true;

View File

@ -32,7 +32,9 @@
rtmps = {
address = ":1945";
};
websecure = {address = ":443";};
websecure = {
address = ":443";
};
};
};
dynamicConfigOptions = {