From a2cfe8391e19bb417ea3622a26e1223587894cb9 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Tue, 14 Nov 2023 20:58:08 +0100 Subject: [PATCH] Remove mount check do to automatic mounting with Volume in Dockerfile --- src/pages/onboard.tsx | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/src/pages/onboard.tsx b/src/pages/onboard.tsx index c18d7ad9a..238d4ef82 100644 --- a/src/pages/onboard.tsx +++ b/src/pages/onboard.tsx @@ -122,42 +122,6 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { }, }; } - Consola.info('Database is writeable'); - - if (process.platform !== 'win32' && env.NEXT_PUBLIC_NODE_ENV === 'production') { - try { - const { stdout, stderr } = await exec("mount | grep '/data'"); - - if (stderr.split('\n').length > 1 || stdout.split('\n').length <= 1) { - Consola.error( - `Database at '${rawDatabaseUrl}' has not been mounted: ${stdout.replace( - '\n', - '\\n' - )} ${stderr.replace('\n', '\\n')}` - ); - return { - props: { - ...translations, - configSchemaVersions: configSchemaVersions, - databaseNotWriteable: true, - errorMessage: `Database at '${rawDatabaseUrl}' is not mounted:\n${stdout}`, - }, - }; - } - } catch (error) { - const errorMessage = `Database at '${rawDatabaseUrl}' has not been mounted: ${error}`; - Consola.error(errorMessage); - return { - props: { - ...translations, - configSchemaVersions: configSchemaVersions, - databaseNotWriteable: true, - stringifiedError: JSON.stringify(error), - errorMessage: errorMessage, - }, - }; - } - } Consola.info(`Database at '${rawDatabaseUrl}' is writeable and mounted`); }