micro/example/.microrc.yaml

90 lines
3.6 KiB
YAML

# you can pass in most config options through environment variables,
# for example `DATABASE_URL` will override the databaseUrl in this config file.
# remove the .yaml extension or change it to .json to use JSON-with-comments
# ref: https://github.com/sylv/venera#sources
databaseUrl: postgresql://micro:youshallnotpass@postgres/micro
# EXTREMELY IMPORTANT
# this is the secret used to sign json web tokens. this *must* be a secure, random string that no one else has.
# if you dont change this, any user will be able to act as any other user by creating a token for someone else.
# 32+ characters is recommended.
secret: YOU_SHALL_NOT_PASS
# the email that will show on the home page. in the future the home page will be customisable,
# until then change this to your own email.
inquiries: admin@example.com
# where to store files, can be relative to the cwd or absolute.
storagePath: /data
# whether files uploaded to one domain should be available on other domains.
# you should leave this enabled as it stops users uploading to {{username}}
# domains as other users, for example user "one" could upload to one.example.com
# then replace "one" with "two" and it would look like user "two" uploaded it.
restrictFilesToHost: true
# # purging can be used to clean up old files, useful if you want to allow large files to be uploaded
# # but dont want to store them forever. this is commented by default to prevent accidental purging
# # uncomment the section below to enable it.
# purge:
# overLimit: 1MB # files over this size will be purged
# afterTime: 1d # after this many days
# # allowTypes is a list of file types that can be uploaded.
# # a prefix will be expanded into known types, so `video` becomes `video/mp4`, `video/webm`, etc.
# # omit entirely to allow all types to be uploaded.
# allowTypes:
# - video
# - image
# - image/png
hosts:
# the first host in the list is the default host
- url: https://i.example.com
# {{username}} will become the users name when they use this host
- url: https://{{username}}.example.com
- url: https://i.example.net
# redirect when users go to this hosts url without a file
redirect: https://example.net
# only allow users with the "admin" tag to use this host
tags: ["admin"]
# # To allow and require users to sign up with an email, specify an SMTP server to send emails from.
# # If you do not specify an email, it will not be asked for during signup and users will sign in with their username.
# # Enabling this on an existing instance will prompt users without an email to add one (https://micro.sylo.digital/i/J1Ilba)
# email:
# from: 'noreply@example.net'
# smtp:
# host: smtp.example.net
# port: 465
# secure: true
# auth:
# user: 'username'
# pass: 'password'
# Conversions allow you to convert files to other formats on upload.
# This is intended for converting inefficient formats like gif to webm (40mb>4mb in testing).
# The original copy will be discarded.
# Video conversions rely on ffmpeg which is a slow and flakey process. If possible,
# it's recommended to disable conversions and just don't upload gifs.
# The recommended options are below, on low power devices like a raspberry pi you should disable conversions entirely.
# This is currently not retroactive, but in the future old files may also be converted.
conversions:
# You cannot convert video/* to image/* and vice versa. How would that even work?
# image/gif to video/webm is an exception.
- from: image/gif # This could also be a list of types, just a category like "image", or both.
to: video/webm
minSize: 1MB # Required size before conversion, files uploaded under this limit are ignored