diff --git a/Dockerfile b/Dockerfile index 7ffd23f683..129c5385ec 100755 --- a/Dockerfile +++ b/Dockerfile @@ -45,6 +45,12 @@ COPY ./dev /usr/src/code/dev COPY ./mongo-init.js /usr/src/code/mongo-init.js COPY ./mongo-entrypoint.sh /usr/src/code/mongo-entrypoint.sh +# Add Installer Templates +COPY ./app/views/install /usr/local/share/appwrite/app/views/install +COPY ./docker-compose.yml /usr/local/share/appwrite/docker-compose.yml +COPY ./mongo-init.js /usr/local/share/appwrite/mongo-init.js +COPY ./mongo-entrypoint.sh /usr/local/share/appwrite/mongo-entrypoint.sh + # Set Volumes RUN mkdir -p /storage/uploads && \ mkdir -p /storage/imports && \ diff --git a/src/Appwrite/Platform/Tasks/Install.php b/src/Appwrite/Platform/Tasks/Install.php index b2a8843049..3371b65223 100644 --- a/src/Appwrite/Platform/Tasks/Install.php +++ b/src/Appwrite/Platform/Tasks/Install.php @@ -1393,7 +1393,20 @@ class Install extends Action if ($suffix !== '' && $suffix[0] !== '/') { $suffix = '/' . $suffix; } - return dirname(__DIR__, 4) . $suffix; + + $roots = [ + dirname(__DIR__, 4), + '/usr/local/share/appwrite', + ]; + + foreach ($roots as $root) { + $path = $root . $suffix; + if (file_exists($path)) { + return $path; + } + } + + return $roots[0] . $suffix; } protected function applyLocalPaths(bool $isLocalInstall, bool $force = false): void