refactor works on lio host
This commit is contained in:
parent
1d9c4beaf3
commit
f0c096edec
73 changed files with 2214 additions and 1091 deletions
53
common/_containers/pgadmin.nix
Normal file
53
common/_containers/pgadmin.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.customServices.pgadmin;
|
||||
in
|
||||
{
|
||||
options.customServices.pgadmin =
|
||||
let
|
||||
lib = pkgs.lib;
|
||||
in
|
||||
{
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
default = 3085;
|
||||
description = "Port number for the PGAdmin interface";
|
||||
};
|
||||
dataDir = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "/var/lib/pgadmin";
|
||||
description = "Directory to store PGAdmin data";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
virtualisation.oci-containers.containers = {
|
||||
#############
|
||||
# pgadmin #
|
||||
#############
|
||||
# NOTE settings live in `/var/lib/librechat` manually right now
|
||||
pgadmin = {
|
||||
user = "root";
|
||||
image = "dpage/pgadmin4:latest";
|
||||
ports = [
|
||||
"${toString cfg.port}:${toString cfg.port}"
|
||||
];
|
||||
environment = {
|
||||
PGADMIN_LISTEN_PORT = toString cfg.port;
|
||||
PGADMIN_DEFAULT_EMAIL = "admin@db.joshuabell.xyz";
|
||||
PGADMIN_DEFAULT_PASSWORD = "password";
|
||||
};
|
||||
volumes = [
|
||||
"${cfg.dataDir}:/var/lib/pgadmin"
|
||||
];
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue