migrate app dataDir to volumes
This commit is contained in:
+3
-2
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user