Commit 210f516c authored by Profpatsch's avatar Profpatsch

containers/default: remove surplus attrs, add drv descriptions

parent 7020e1e1
......@@ -21,8 +21,9 @@ let
sanghaPostgresTemplate = eval.config.passthru;
# generated docker image for the sangha postgres server
sanghaPostgresDockerImage = pkgs.runCommand "sangha-docker-image" {
sanghaPostgresDockerImage = pkgs.runCommand "sangha-docker-image" rec {
image = eval.config.generated.dockerImages.sanghaPostgres;
passthru.meta = image.meta;
}
# produces an output link for hydra
''
......@@ -32,8 +33,10 @@ let
'';
in {
inherit sanghaPostgresTemplate sanghaPostgresDockerImage;
pkgs = { inherit (pkgs) sangha; };
pkgs = {
inherit (pkgs) sangha;
inherit sanghaPostgresTemplate;
};
downloads.dockerImages = {
sangha.postgres = sanghaPostgresDockerImage;
};
......
......@@ -78,10 +78,14 @@ let
GRANT ALL PRIVILEGES ON DATABASE ${DbName} TO ${User};
'';
in pkgs.runCommand "sangha-db-template" {
in pkgs.runCommand "sangha-postgres-template" {
nativeBuildInputs = [ pkgs.postgresql localeFiles ];
# pass through the sangha configfile used
passthru = { inherit sanghaConfig; };
meta.description = ''
Postgres database for sangha, completely initialized
and with mock data.
'';
} ''
mkdir $out
export PGDATA=$out
......@@ -147,11 +151,16 @@ in {
# configuration for generating a docker image
dockerConfig = {
generated.dockerImages.sanghaPostgres =
let dbDir = "/database";
let
dbDir = "/database";
uidGid = 999;
uidGidStr = toString uidGid;
description = ''
Docker image containing a minimal postgres closure
and an initialized sangha database template in a volume.
'';
in pkgs.dockerTools.buildImage {
image = pkgs.dockerTools.buildImage {
name = "sangha-postgres";
tag = "unstable";
......@@ -192,9 +201,14 @@ in {
chown --recursive ${uidGidStr}:${uidGidStr} "./${dbDir}"
'';
};
in image.overrideAttrs (_: {
meta = { inherit description; };
});
};
in
in
let
cfg = config.org.techcultivation.deploy.database;
in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment