modularization of all servers donion rings
This commit is contained in:
34
modules/servers/ryot.nix
Normal file
34
modules/servers/ryot.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ lib, config, proxyReverse, ... }:
|
||||
let
|
||||
port = 8881;
|
||||
url = "tracker.${config.my.domain}";
|
||||
in {
|
||||
options.my.servers.ryot.enable = lib.mkEnableOption "enable";
|
||||
config = lib.mkIf config.my.servers.ryot.enable {
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers.ryot = {
|
||||
image = "ghcr.io/ignisda/ryot:v5.5.0";
|
||||
ports = [ "8765:8000" ];
|
||||
environment = {
|
||||
TZ = "America/Mexico_City";
|
||||
DATABASE_URL = "postgres:///ryot?host=${config.my.postgresSocket}";
|
||||
FRONTEND_INSECURE_COOKIES = "true";
|
||||
VIDEO_GAMES_TWITCH_CLIENT_ID = "tfu0hw0zbdbu4lco4h72nqkb8krxp9";
|
||||
VIDEO_GAMES_TWITCH_CLIENT_SECRET = "582ecfb01ihv6wnt8zbc9pf3hs9p54";
|
||||
};
|
||||
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
|
||||
labels = {
|
||||
"flame.type" = "application";
|
||||
"flame.name" = "Ryot";
|
||||
"flame.url" = url;
|
||||
"flame.icon" = "radar";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."tracker.${config.my.domain}" = proxyReverse port // { };
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user