79 lines
1.8 KiB
Plaintext
79 lines
1.8 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 %>
|
|
<% 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/*"
|
|
expiration: 1 week
|
|
- type: "*"
|
|
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: <%= !@allow_anonymous_uploads %>
|
|
requirePubkeyInRule: <%= !@allow_anonymous_uploads %>
|
|
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 %>
|