Files
blossom-cookbook/templates/default/config.yml.erb

63 lines
1.5 KiB
Plaintext

port: <%= @port %>
host: "<%= @host %>"
publicDomain: "<%= @domain %>"
database:
path: "/home/<%= @user %>/data/sqlite.db"
storage:
backend: "<%= @storage_backend %>"
<% if @storage_backend == 'local' %>
local:
dir: "<%= @storage_local_dir %>"
<% elsif @storage_backend == 's3' %>
s3:
endpoint: "<%= @storage_s3['endpoint'] %>"
region: "<%= @storage_s3['region'] %>"
bucket: "<%= @storage_s3['bucket'] %>"
accessKey: "<%= @storage_s3['access_key'] %>"
secretKey: "<%= @storage_s3['secret_key'] %>"
<% end %>
rules:
<% if @allowed_pubkeys && !@allowed_pubkeys.empty? %>
- type: "*"
expiration: "100 years"
pubkeys:
<% @allowed_pubkeys.each do |pk| %>
- "<%= pk %>"
<% end %>
<% else %>
- type: "image/*"
expiration: 1 month
- type: "video/*"
expiration: 1 week
- type: "*"
expiration: 1 week
<% end %>
upload:
enabled: true
requireAuth: <%= @allowed_pubkeys && !@allowed_pubkeys.empty? ? 'true' : 'false' %>
requirePubkeyInRule: <%= @allowed_pubkeys && !@allowed_pubkeys.empty? ? 'true' : 'false' %>
maxSize: <%= @max_size %>
list:
enabled: <%= @list_enabled %>
requireAuth: <%= @list_require_auth %>
allowListOthers: <%= @list_allow_others %>
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 %>