freshrss oidc
This commit is contained in:
@@ -26,29 +26,34 @@ in {
|
||||
PGID = "1000";
|
||||
TRUSTED_PROXY = "10.0.0.0/8 192.168.0.1/16";
|
||||
PUBLISHED_PORT = "80";
|
||||
ADMIN_PASSWORD = "admin"; # Change this to a secure password in production!
|
||||
ADMIN_API_PASSWORD = "admin"; # Change this to a secure password in production!
|
||||
BASE_URL = "https://${containerCfg.subdomain}.${serverCfg.domain}";
|
||||
SERVER_DNS = "${containerCfg.subdomain}.${serverCfg.domain}";
|
||||
DB_HOST = "${builder.host}";
|
||||
DB_BASE = "freshrss_db";
|
||||
DB_USER = "freshrss_user";
|
||||
|
||||
OIDC_PROVIDER_METADATA_URL = "https://${serverCfg.containers.authentik.subdomain}.${serverCfg.domain}/application/o/freshrss/.well-known/openid-configuration";
|
||||
OIDC_REMOTE_USER_CLAIM = "preferred_username";
|
||||
OIDC_CLIENT_ID = "freshrss";
|
||||
OIDC_SCOPES = "openid profile";
|
||||
OIDC_X_FORWARDED_HEADERS = "X-Forwarded-Host X-Forwarded-Port X-Forwarded-Proto";
|
||||
OIDC_CLIENT_SECRET = "123"; #SECRET
|
||||
# OIDC_CLIENT_CRYPTO_KEY = "123"; #SECRET
|
||||
};
|
||||
|
||||
overrides = {
|
||||
volumes = [
|
||||
"${serverCfg.configPath}/freshrss:/config"
|
||||
];
|
||||
volumes = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
setup = {
|
||||
trigger = "server"; # Triggers atomic environment verification on main controller
|
||||
envFile = config.sops.secrets."FRESHRSS".path;
|
||||
envFile = [ config.sops.secrets."FRESHRSS".path config.sops.secrets."CUSTOM".path];
|
||||
script = pkgs.writeShellScript "setup-freshrss" ''
|
||||
RSS_URL="https://${containerCfg.subdomain}.${serverCfg.domain}"
|
||||
${pkgs.curl}/bin/curl -s -X POST "$RSS_URL/i/index.php?step=0" -H "Content-Type: application/x-www-form-urlencoded" --data-raw "language=en"
|
||||
|
||||
RSS="${pkgs.podman}/bin/podman --events-backend=none exec freshrss-server"
|
||||
$RSS ./cli/prepare.php
|
||||
$RSS ./cli/do-install.php --default-user $DEFAULT_ADMIN_USERNAME --auth-type http_auth --base-url https://${containerCfg.subdomain}.${serverCfg.domain} --language en \
|
||||
--title RSS --api-enabled --db-type pgsql --db-host ${builder.host} --db-user freshrss-user --db-API $DB_PASSWORD --db-base freshrss-db
|
||||
$RSS ./cli/reconfigure.php
|
||||
$RSS ./cli/update-user.php --user $DEFAULT_ADMIN_USERNAME --password $DEFAULT_ADMIN_PASSWORD --email $DEFAULT_ADMIN_EMAIL
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user