migrate app dataDir to volumes

This commit is contained in:
Girish Ramakrishnan
2022-06-01 22:44:52 -07:00
parent 8fc8128957
commit dddc5a1994
12 changed files with 117 additions and 62 deletions
+3 -2
View File
@@ -41,10 +41,11 @@ async function getAppDisks(appsDataDisk) {
const allApps = await apps.list();
for (const app of allApps) {
if (!app.dataDir) {
if (!app.storageVolumeId) {
appDisks[app.id] = appsDataDisk;
} else {
const [error, result] = await safe(df.file(app.dataDir));
const dataDir = await apps.getStorageDir(app);
const [error, result] = await safe(df.file(dataDir));
appDisks[app.id] = error ? appsDataDisk : result.filesystem; // ignore any errors
}
}