Compare commits
4 Commits
d789091d8a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
314bd6ab1a
|
|||
|
1ac2cfcaab
|
|||
|
1407dc16e5
|
|||
|
200af9412a
|
@@ -1,18 +1,32 @@
|
||||
node.default['blossom']['repo_url'] = 'https://github.com/67P/blossom-server.git'
|
||||
node.default['blossom']['revision'] = 'master'
|
||||
node.default['blossom']['repo_url'] = 'https://github.com/hzrd149/blossom-server.git'
|
||||
node.default['blossom']['revision'] = 'v6.1.4'
|
||||
node.default['blossom']['install_dir'] = '/opt/blossom'
|
||||
node.default['blossom']['user'] = 'blossom'
|
||||
node.default['blossom']['group'] = 'blossom'
|
||||
node.default['blossom']['port'] = 3000
|
||||
node.default['blossom']['host'] = '0.0.0.0'
|
||||
node.default['blossom']['domain'] = 'blossom.example.com'
|
||||
node.default['blossom']['allow_anonymous_uploads'] = true
|
||||
node.default['blossom']['allowed_pubkeys'] = []
|
||||
|
||||
node.default['blossom']['storage']['backend'] = 'local'
|
||||
node.default['blossom']['storage']['local']['dir'] = "/home/#{node['blossom']['user']}/data/blobs"
|
||||
node.default['blossom']['storage']['s3'] = {}
|
||||
|
||||
node.default['blossom']['ldap']['enabled'] = false
|
||||
node.default['blossom']['ldap']['url'] = nil
|
||||
node.default['blossom']['ldap']['bind_dn'] = nil
|
||||
node.default['blossom']['ldap']['password'] = nil
|
||||
node.default['blossom']['ldap']['search_dn'] = nil
|
||||
node.default['blossom']['ldap']['search_filter'] = nil
|
||||
|
||||
node.default['blossom']['max_size'] = 104857600
|
||||
node.default['blossom']['list']['enabled'] = true
|
||||
node.default['blossom']['list']['require_auth'] = true
|
||||
node.default['blossom']['list']['allow_list_others'] = false
|
||||
node.default['blossom']['delete']['require_auth'] = true
|
||||
node.default['blossom']['landing']['enabled'] = true
|
||||
node.default['blossom']['landing']['title'] = 'Blossom Server'
|
||||
node.default['blossom']['dashboard']['enabled'] = false
|
||||
node.default['blossom']['dashboard']['username'] = 'admin'
|
||||
node.default['blossom']['dashboard']['password'] = nil
|
||||
|
||||
@@ -58,12 +58,19 @@ template "#{node['blossom']['install_dir']}/config.yml" do
|
||||
storage_backend: node['blossom']['storage']['backend'],
|
||||
storage_local_dir: node['blossom']['storage']['local']['dir'],
|
||||
storage_s3: node['blossom']['storage']['s3'],
|
||||
allow_anonymous_uploads: node['blossom']['allow_anonymous_uploads'],
|
||||
ldap: node['blossom']['ldap'],
|
||||
allowed_pubkeys: node['blossom']['allowed_pubkeys'],
|
||||
max_size: node['blossom']['max_size'],
|
||||
list_enabled: node['blossom']['list']['enabled'],
|
||||
list_require_auth: node['blossom']['list']['require_auth'],
|
||||
list_allow_others: node['blossom']['list']['allow_list_others'],
|
||||
delete_require_auth: node['blossom']['delete']['require_auth']
|
||||
delete_require_auth: node['blossom']['delete']['require_auth'],
|
||||
landing_enabled: node['blossom']['landing']['enabled'],
|
||||
landing_title: node['blossom']['landing']['title'],
|
||||
dashboard_enabled: node['blossom']['dashboard']['enabled'],
|
||||
dashboard_username: node['blossom']['dashboard']['username'],
|
||||
dashboard_password: node['blossom']['dashboard']['password']
|
||||
)
|
||||
notifies :restart, 'service[blossom]', :delayed
|
||||
end
|
||||
|
||||
@@ -27,7 +27,14 @@ storage:
|
||||
<% @allowed_pubkeys.each do |pk| %>
|
||||
- "<%= pk %>"
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% end %>
|
||||
<% if @ldap['enabled'] %>
|
||||
- type: "*"
|
||||
expiration: "100 years"
|
||||
ldap:
|
||||
filter: "<%= @ldap['search_filter']%>"
|
||||
<% end %>
|
||||
<% if @allow_anonymous_uploads %>
|
||||
- type: "image/*"
|
||||
expiration: 1 month
|
||||
- type: "video/*"
|
||||
@@ -36,10 +43,19 @@ storage:
|
||||
expiration: 1 week
|
||||
<% end %>
|
||||
|
||||
<% if @ldap %>
|
||||
ldap:
|
||||
enabled: <%= @ldap['enabled'] %>
|
||||
url: "<%= @ldap['url'] %>"
|
||||
bindDN: "<%= @ldap['bind_dn'] %>"
|
||||
password: "<%= @ldap['password'] %>"
|
||||
searchDN: "<%= @ldap['search_dn'] %>"
|
||||
<% end %>
|
||||
|
||||
upload:
|
||||
enabled: true
|
||||
requireAuth: <%= @allowed_pubkeys && !@allowed_pubkeys.empty? ? 'true' : 'false' %>
|
||||
requirePubkeyInRule: <%= @allowed_pubkeys && !@allowed_pubkeys.empty? ? 'true' : 'false' %>
|
||||
requireAuth: <%= !@allow_anonymous_uploads %>
|
||||
requirePubkeyInRule: <%= !@allow_anonymous_uploads %>
|
||||
maxSize: <%= @max_size %>
|
||||
|
||||
list:
|
||||
@@ -49,3 +65,14 @@ list:
|
||||
|
||||
delete:
|
||||
requireAuth: <%= @delete_require_auth %>
|
||||
|
||||
landing:
|
||||
enabled: <%= @landing_enabled %>
|
||||
title: "<%= @landing_title %>"
|
||||
|
||||
<% if @dashboard_enabled %>
|
||||
dashboard:
|
||||
enabled: true
|
||||
username: "<%= @dashboard_username %>"
|
||||
password: "<%= @dashboard_password %>"
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user