Some fixes regarding startup of postgres
There were some issues with setting mount dependencies for postgresql. Now however that is solved. What didn't work was when the disk-mapping.json file depended on vault-agent. As that file is not secret by any means, I moved it to /var/lib. The only thing left to do, is to make postgresql start up when the server is first created, and the /var/lib file does not exist.
This commit is contained in:
parent
1ca3a407f2
commit
0ff2b12fb0
3 changed files with 42 additions and 6 deletions
|
@ -51,6 +51,7 @@ in
|
|||
khscodes.fs.zfs.zpools."${cfg.pool}".datasets."${cfg.datasetName}" = cfg.datasetConfig;
|
||||
systemd.services.postgresql = {
|
||||
after = [ "khscodes-zpool-setup.service" ];
|
||||
requires = [ "khscodes-zpool-setup.service" ];
|
||||
unitConfig = {
|
||||
RequiresMountsFor = [ cfg.datasetConfig.mountpoint ];
|
||||
};
|
||||
|
@ -68,7 +69,10 @@ in
|
|||
lib.lists.map (db: {
|
||||
name = "postgresqlBackup-${db}";
|
||||
value = {
|
||||
after = [ "khscodes-zpool-setup.service" ];
|
||||
after = [
|
||||
"khscodes-zpool-setup.service"
|
||||
];
|
||||
requires = [ "khscodes-zpool-setup.service" ];
|
||||
unitConfig = {
|
||||
RequiresMountsFor = [ cfg.backupDatasetConfig.mountpoint ];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue