DE EN EN (Google)

Fylr

Flyr is a companion product for easydb. It serves as server for additional services which are not covered by the easydb server. More information on Fylr can be found on its website fylr.io.

easydb optionally uses two features of Fylr:

Configuration

In yml-files created by Programmfabrik we use an indentation of 2 spaces per ⇨.

Config Format Description
server Map
addr String Address of the server.
hostname String In case the hostname is responded in any api response it is replaced with this one. If hostname is empty, the addr is used
accounts Map<String>String Accounts defines a list of accounts that are allowed to login the easydbservices frontend. The api endpoints are not influenced by this accounts. Example: root: "admin"
assets_from_local_fs Boolean The static assets are build into the binary. If you want to load them directly from the filesystem set this option to true. DO NOT SET TO TRUE IN PRODUCTION
log Map Configure the logging behavior
⇨⇨level String Which log level should be logged. Available [panic, fatal, error, warn, info, debug, trace]. Default “info”
⇨⇨file String Location of the sqlite file for the frontend log. Default “./log.db”
cert_file String If the server should be run with SSL enabled, both cert_file & key_file must be configured.
key_file String If the server should be run with SSL enabled, both cert_file & key_file must be configured.
pdf_creator Map
chrome_addr String chrome_addr points to the headless chrome. 9222 is the standard port for the chrome remote debugging protocol
max_chrome_connections int max_chrome_connections prevents running out of memory because to many chrome tabs are open at the same time. Defaults to 10 to many connections can cause a lot of memory in the headless chrome
 chrome_back_channel_httpd Map Local http server which serves the uploaded html for the access of the headless chrome
⇨⇨addr String Address to run that second httpd on. MUST BE ACCESSABLE FROM THE headless chrome container
⇨ hostname String Hostname for defining a docker-net internal dns name instead of using an IP. If not set, addr is used
link_shortener Map
domain String Base domain for the shortlinks. Is replied in the add link request. Should be public accessable
default_expire_days int If not set differently in the add link request, this expiry time is used. If default_expire_days is 0, the links never expire
min_length int Minimum length for a shortlink key
max_length int Maximum length for a shortlink key
db String Path to the sqlite db where the short links are stored
allowed_urls String[] Array of allowed shortlink targets. With a narrow configuration we can only allow the shorting of easyd urls
objectstore Map
dir String Top-Level-Directory where Fylr stores its data.
uids Map[] Configured uuids for the store
⇨⇨uid String UID of the storage, this is a unique id for each storage group.
⇨⇨name String Name for the store
⇨⇨allowed_instances String UID of the storage, this is a unique id for each storage group.
⇨⇨⇨id String Identifier of one of the clients for the storage.
⇨⇨⇨name String Optional name for the client, as shown in the overview page on Fylr.
zip If set, the Zip service is enabled and allows Zipfiles to be created with files originating the given URLs. Each entry is endpoint
allowed_urls String[] URL bases that are allowed to get files for the zip from.
max_concurrent_head_reqs int maximum parallel check if files are available. To big numbers could consume all system file descriptors or the remote resource blocks us because of DOS attack prevention

Configuration files

To show you more than just a few basics, we use an unusal elaborate example.

An elaborate main configuration file, /srv/easydb/config/fylr.yml, could look like this:

(From now on we are assuming that /srv/easydb is your base directory where you installed easydb.)

hostname:
  fylr: easydb-fylr:4000

external_url: https://easydb-system.example.com
objectstore:
  uids: []

link_shortener:
  default_expire_days: 3650

root_password: my_secret

smtp:
  server: relay.example.com
  hostname: easydb-system.example.com
  from-address: noreply@easydb-system.example.com

In an additional configuration file, /srv/easydb/config/fylr.d/objectstore_uids.yml, you could provide a list of objectstores:

objectstore:
  uids:
    # for project #12345
    - uid: 'e978560a-bd52-4a56-86d4-ed29d6041d21'
      name: 'objectstore1'
      allowed_instances:
        - id: '5fa800a5-0b08-4650-9ea4-7a566eb0dac3'
          name: access_by_production
        - id: 'abcdefghijklmnopqRSTUVWXYZ'
          name: access_by_internal
    - uid: 'f637ff9b-26ef-48a9-9019-a90deb254a70'
      allowed_instances:
        - id: '7e7896cb-2f4a-4b4d-9d72-34b7cf535c0c'

fylr.yml