Initial commit
This commit is contained in:
43
templates/default/config.yml.erb
Normal file
43
templates/default/config.yml.erb
Normal file
@@ -0,0 +1,43 @@
|
||||
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: 5368709120 # 5 GB
|
||||
Reference in New Issue
Block a user