Manage data-access container declaratively
This commit is contained in:
parent
45761cb113
commit
565ee07812
8 changed files with 72 additions and 6 deletions
30
containers/data-access/default.nix
Normal file
30
containers/data-access/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./secret.nix ];
|
||||
|
||||
config = {
|
||||
chvp.hasContainers = true;
|
||||
|
||||
containers.data-access = {
|
||||
ephemeral = true;
|
||||
autoStart = true;
|
||||
bindMounts = {
|
||||
"/home/data/data" = {
|
||||
hostPath = "/srv/data";
|
||||
isReadOnly = false;
|
||||
};
|
||||
"/var/secrets" = {
|
||||
hostPath = "${config.chvp.dataPrefix}/var/secrets/data-access";
|
||||
isReadOnly = true;
|
||||
};
|
||||
};
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
hostAddress6 = "fc00::1";
|
||||
localAddress = "192.168.100.11";
|
||||
localAddress6 = "fc00::2";
|
||||
config = import ./config.nix;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue