Skip to content

Commit

Permalink
Added support for multiple directories to deploy OOD extensions/custo…
Browse files Browse the repository at this point in the history
…mizations
  • Loading branch information
abujeda committed Dec 5, 2024
1 parent df542b8 commit 9870b80
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions apps/dashboard/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,17 @@ class Application < Rails::Application
config.autoload_paths << ::Configuration.config_root.join("lib").to_s
config.paths["app/views"].unshift ::Configuration.config_root.join("views").to_s
end

# Enable installed plugins only if configured by administrator
plugins_dir = Pathname.new(::Configuration.plugins_directory)
if plugins_dir.directory?
plugins_dir.children.select(&:directory?).each do |installed_plugin|
next unless installed_plugin.readable?

config.paths["config/initializers"] << installed_plugin.join("initializers").to_s
config.autoload_paths << installed_plugin.join("lib").to_s
config.paths["app/views"].unshift installed_plugin.join("views").to_s
end
end
end
end
5 changes: 3 additions & 2 deletions apps/dashboard/config/configuration_singleton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ def string_configs
:rclone_extra_config => nil,
:default_profile => nil,
:project_size_timeout => '15',
:novnc_default_compression => '6',
:novnc_default_quality => '2'
:novnc_default_compression => '6',
:novnc_default_quality => '2',
:plugins_directory => '/var/www/ood/apps/plugins'
}.freeze
end

Expand Down

0 comments on commit 9870b80

Please sign in to comment.