This repository has been archived on 2024-08-30. You can view files and clone it, but cannot push or open issues or pull requests.
infrastructure/hosts/carbon/services/privacy/safetwitch.nix

56 lines
1.2 KiB
Nix
Raw Normal View History

2024-05-29 17:15:20 +02:00
{ pkgs, config, ... }:
{
virtualisation.oci-containers.containers = {
# TODO fix routing
safe-twitch-frontend = {
image = "codeberg.org/safetwitch/safetwitch:latest";
ports = [
"8280:8280"
];
environment = {
SAFETWITCH_BACKEND_DOMAIN = "sf.${config.networking.domain}";
SAFETWITCH_INSTANCE_DOMAIN = "safetwitch.${config.networking.domain}";
SAFETWITCH_HTTPS = "true";
SAFETWITCH_DEFAULT_LOCALE = "en";
SAFETWITCH_FALLBACK_LOCALE = "en";
};
};
safetwitch-backend = {
image = "codeberg.org/safetwitch/safetwitch-backend:latest";
ports = [
"7100:7100"
];
environment = {
URL = "sf.${config.networking.domain}";
PORT = "7100";
};
};
};
services.nginx = {
virtualHosts = {
"safetwitch.${config.networking.domain}" =
{
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = " http://127.0.0.1:8280";
};
};
"sf.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = " http://127.0.0.1:7100";
};
};
};
};
}