fix(docker): get correct path for volume data
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
948fbf943e
commit
2c095bfbc5
2 changed files with 9 additions and 6 deletions
|
@ -3,6 +3,7 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
} @ inputs:
|
||||
with lib;
|
||||
|
@ -57,9 +58,11 @@ in {
|
|||
backend = "docker";
|
||||
|
||||
projects = let
|
||||
basePath = "${self}/devices/${config.vars.hostName}/modules/arion";
|
||||
|
||||
composeFiles =
|
||||
filter (n: hasSuffix "compose.nix" (toString n))
|
||||
(filesystem.listFilesRecursive ./.);
|
||||
(filesystem.listFilesRecursive basePath);
|
||||
|
||||
projects = filterAttrs (n: v: v.enabled or true) (listToAttrs (map (p: {
|
||||
name = elemAt (match ".*\/(.*)\/compose\.nix" (toString p)) 0;
|
||||
|
@ -70,7 +73,7 @@ in {
|
|||
rwPath =
|
||||
configPath
|
||||
+ "/"
|
||||
+ elemAt (match "[^-]*-(.*)" "${dirOf p}") 0;
|
||||
+ removePrefix basePath "${dirOf p}";
|
||||
});
|
||||
})
|
||||
composeFiles));
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
restart = "always";
|
||||
|
||||
volumes = [
|
||||
"${rwPath}/data/be/config.txt:/app/config.txt:ro"
|
||||
"${rwPath}/data/be/playlists:/app/playlists:rw"
|
||||
"${rwPath}/be/config.txt:/app/config.txt:ro"
|
||||
"${rwPath}/be/playlists:/app/playlists:rw"
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
|||
restart = "always";
|
||||
|
||||
volumes = [
|
||||
"${rwPath}/data/br/config.txt:/app/config.txt:ro"
|
||||
"${rwPath}/data/br/playlists:/app/playlists:rw"
|
||||
"${rwPath}/br/config.txt:/app/config.txt:ro"
|
||||
"${rwPath}/br/playlists:/app/playlists:rw"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue