Files
system-config/system/hosts/mcp/containers/blazestar.net/wargame-vods.nix
T

46 lines
1.2 KiB
Nix

{ config, ... }:
let
inherit (import ../lib.nix config) blazestar;
db_password = "wargame-vods/db/password";
admin_token = "wargame-vods/admin-token";
youtube_api_key = "wargame-vods/youtube-api-key";
in
{
sops = {
secrets = {
"${db_password}" = { };
"${admin_token}" = { };
"${youtube_api_key}" = { };
};
templates."wargame-vods.env" = {
mode = "0400";
content = ''
ADMIN_TOKEN=${config.sops.placeholder."${admin_token}"}
PGHOST=db
PGPORT=5432
PGUSER=wargame-vods
PGPASS=${config.sops.placeholder."${db_password}"}
PGDATABASE=wargame-vods
STATIC_DIR=/app/static
PORT=8081
SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
CORS_ORIGINS=https://vods.blazestar.net
YOUTUBE_API_KEY=${config.sops.placeholder."${youtube_api_key}"}
'';
restartUnits = [ "podman-wargame-vods.service" ];
};
};
virtualisation.web-containers.containers.wargame-vods = {
image = "docker.havenisms.com/apps/wargame-vods";
hostname = "vods";
domain = blazestar;
port = 8081;
public = true;
volumes = [ ];
dependsOn = [ "db" ];
environmentFiles = [
config.sops.templates."wargame-vods.env".path
];
};
}