### Start fylr Server Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/windows.md Command to start the fylr server with a specified configuration file. ```bash .\fylr.exe server -c fylr.yml ``` -------------------------------- ### Complete Manifest Example Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-administrators/tools/json-importer/examples/starting-the-migration.md A JSON manifest file used to migrate basetypes and objects, including payload filenames. ```json { "source": "Example Migration", "batch_size": 100, "payload_base_uri": "", "eas_type": "url", "eas_skip_errors": true, "eas_replace_url": "", "skip_head_request": true, "mapping": null, "payloads": [ "basetype-tags.json", "basetype-groups.json", "basetype-users.json", "basetype-pools.json", "userobject-orte-level-0.json", "userobject-orte-level-1.json", "userobject-orte-level-2.json", "userobject-personen.json", "userobject-schlagwoerter.json", "userobject-bilder-0.json", "userobject-objekte-0.json", "userobject-objekte-1.json", "basetype-collection-0.json", "userobject-bilder-0-version-2.json" ] } ``` -------------------------------- ### Download example fylr configuration Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/linux-docker-compose.md Downloads the example fylr.yml configuration file from the official GitHub repository. ```bash curl https://raw.githubusercontent.com/programmfabrik/fylr-gitbook/main/_assets/fylr.yml -o config/fylr/fylr.yml ``` -------------------------------- ### Minimal fylr Configuration Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/windows.md Example of editing fylr.yml to start with minimal dependencies. ```yaml fylr+: [...] services+: [...] execserver+: commands: fylr: prog: fylr.exe services: ``` -------------------------------- ### Start Elasticsearch Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/windows.md Command to start Elasticsearch on Windows using PowerShell. ```powershell .\elasticsearch-8.6.1\bin\elasticsearch.bat ``` -------------------------------- ### Audio Snippet Recipe Options Example Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-developers/fileversions/recipes-available-via-url.md Example of recipe options for generating audio snippets, specifying format, start, and end times. ```json { "format":"mp3", "start":"0.305", "end":"20.571" } ``` -------------------------------- ### Install fylr using docker compose Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/help/tutorials/for-system-administrators/migrate-map-to-local-storage.md Commands to install fylr using docker compose, including setting up directories, downloading configuration files, and starting the services. ```bash apt-get install docker-compose-plugin mkdir /srv/fylr ; cd /srv/fylr mkdir -p config/fylr assets backups migration postgres sqlbackups chown 1000 assets backups migration chown 999 postgres sqlbackups curl https://raw.githubusercontent.com/programmfabrik/fylr-gitbook/main/_assets/fylr.yml -o config/fylr/fylr.yml curl https://raw.githubusercontent.com/programmfabrik/fylr-gitbook/main/_assets/maintain -o maintain curl https://raw.githubusercontent.com/programmfabrik/fylr-gitbook/main/_assets/docker-compose.yml -o docker-compose.yml chmod a+x maintain vi docker-compose.yml # see below for content docker compose up -d; docker compose logs -f ``` -------------------------------- ### Base Configuration Example Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-developers/plugin.md An example of base configuration for a plugin, including adding a user parameter. ```yaml base_config: - name: user parameters: api_user: type: user ``` -------------------------------- ### Start fylr and Elasticsearch Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/backup.md Command to start fylr and Elasticsearch services on the new server after restore. ```bash docker-compose up -d ``` -------------------------------- ### Start PostgreSQL Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/backup.md Command to start only the PostgreSQL service on the new server during restore. ```bash docker-compose up -d postgresql ``` -------------------------------- ### Start fylr service Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/postgresql-versions.md Start the fylr application using docker compose. ```bash docker compose up -d fylr ``` -------------------------------- ### Example JSON for Plugin Configuration Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-developers/plugin.md Example JSON structure to set the plugin for export options. ```json { "export": { "produce_options": { "plugin": "fylr_example:demo" } } } ``` -------------------------------- ### Start postgres and fylr Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/help/tutorials/for-system-administrators/migrate-map-to-local-storage.md Command to start postgres and fylr services using docker compose. ```bash docker compose up -d; docker compose logs -f ``` -------------------------------- ### FFmpeg Configuration Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/configuration/fylr.example.yml.md Configuration for FFmpeg commands, including startup checks and environment variables. ```yaml ffmpeg: waitgroup: a commands: ffmpeg: prog: ffmpeg startupCheck: args: - "-version" regex: "ffmpeg version 5[\\.0-9]+ Copyright" ffprobe: prog: ffprobe startupCheck: args: - "-version" regex: "ffprobe version 5[\\.0-9]+ Copyright" convert: prog: "convert" env: - "OMP_NUM_THREADS=1" startupCheck: args: - "-version" regex: "Version: ImageMagick 7..*?https://imagemagick.org" composite: prog: "composite" env: - "OMP_NUM_THREADS=1" startupCheck: args: - "-version" regex: "Version: ImageMagick 7..*?https://imagemagick.org" fylr_metadata: env: - FYLR_METADATA_BLURHASH=1g prog: "fylr" args: - "metadata" ffmpegthumbnailer: prog: ffmpegthumbnailer startupCheck: args: - "-v" regex: "ffmpegthumbnailer version: 2\\..*" ``` -------------------------------- ### SSH Public Key Example Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/linux-docker-compose/if-we-install-on-your-server.md An example of a public SSH key that can be used for granting access to the server. ```text ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINHZyevoIWd21NeOejA3AtXsiY5fOhDFXjhnMFmRBOMi ``` -------------------------------- ### SOffice Configuration Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/configuration/fylr.example.yml.md Configuration for LibreOffice (soffice) commands, including checks for version and dependencies like ImageMagick. ```yaml soffice: waitgroup: c commands: soffice: prog: soffice startupCheck: args: - "--headless" - "--invisible" - "--version" regex: "LibreOffice 7[.0-9]+" convert: prog: "convert" env: - "OMP_NUM_THREADS=1" startupCheck: args: - "-version" regex: "Version: ImageMagick 7..*?https://imagemagick.org" composite: prog: "composite" env: - "OMP_NUM_THREADS=1" startupCheck: args: - "-version" regex: "Version: ImageMagick 7..*?https://imagemagick.org" fylr_metadata: env: - FYLR_METADATA_BLURHASH=1g prog: "fylr" args: - "metadata" ``` -------------------------------- ### Example EAS URL Entry Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-administrators/tools/json-importer/examples/starting-the-migration.md An example of how an EAS URL can be specified in a payload entry, with a placeholder for the actual server path. ```json "eas:url": "http://localhost/photo-1560930950-5cc20e80e392?w=800&q=80" ``` -------------------------------- ### fylr.example.yml Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/configuration/fylr.example.yml.md This is an example configuration file for fylr.yml, demonstrating various settings and their explanations through comments. It covers configuration file merging rules, environment variable overrides, and provides a minimal example of how to set external URL and database settings. ```yaml ## - Some of the regexs to check for versions might require modifications ## - All relative paths described in the file are relative to cmd/fylr unless otherwise ## stated ## - All ports described in the file are formatted to work with Golang net/http package ## ## Multiple config files can be parsed (use -c ... -c ... -c ...). ## The following rules apply: ## - For maps the whole map is replaced, unless the key which holds the map ## ends ins a plus. If it ends in a minus, values are removed from a map. ## - For slices the whole slice is replace. If the key ends in a +, values are ## are appended, if it ends in a "-" values are removed. If it ends in "<", ## values are prepended. ## - Other values are overwritten ## ## To set the externalURL and the sqlite database name in a minimum fylr.yml one could do: ## ## ---fylr.yml--- ## fylr+: ## externalURL: "http://localhost" ## db+: ## dsn: mysqlite.db ## -------------- ## ## The "+" on the top level and for "db" is needed to tell fylr to merge the map ## rather than overwriting it. If the .yml uses "fylr" instead (no "+") the ## default config will be replaced. ## ## Environemnt allows to overwrite the fylr.yml All variables are read in ## upper-case. For the path to deeper variables, use "_" as separator. Supported ## types: string, []string. To fill []string, use a JSON array. ## ## Example: FYLR_DB_DSN="host=localhost port=5432 user=fylr dbname=test" ## FYLR_DB_DRIVER="postgres" ## ## Use --env-prefix on the command line to overwrite the FYLR_ default ``` -------------------------------- ### fylr.example.yml Configuration Snippet Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/configuration/fylr.example.yml.md A sample configuration block from fylr.example.yml showing various settings. ```yaml # All config is below "fylr" # Typically you use ":80" for the forward http and ":443" for webapp.addr. # Default is "" (off) # With letsEncrypt configured below, this is used for: #forwardHttpAddr: "" # use port 443, letsencrypt challenge_type=tls-alpn-01 #forwardHttpAddr: ":80" # use port 80, letsencrpyt challenge_type=http-01 forwardHttpAddr: ":80" # Automatic certificate management can be enabled using the "letsencrypt" # property. With this setting, fylr automatically retrieves and renews # an certificate for the domain of fylr.externalURL. letsEncrypt: # email is used to register the certificate with Let's Encrypt email: you@example.com # CA overwrites the default CA für Let's Encrypt. If unset, the # default CA is "https://acme-v02.api.letsencrypt.org/directory" CA: "" # EAB (External Account Binding) contains information # necessary to bind or map an ACME account to some # other account known by the CA. # # External account bindings are "used to associate an # ACME account with an existing account in a non-ACME # system, such as a CA customer database." # # "To enable ACME account binding, the CA operating the # ACME server needs to provide the ACME client with a # MAC key and a key identifier, using some mechanism # outside of ACME." §7.3.4 externalAccount: # "The key identifier MUST be an ASCII string." §7.3.4 keyId: "" # "The HMAC key SHOULD be provided in base64url-encoded # form, to maximize compatibility between non-ACME # provisioning systems and ACME clients." §7.3.4 hmacKey: "" # useStagingCA sets the staging server of Let's Encrypt which has a higher # quota than the production server. However, these certificates are for # testing purposes only. They are not signed for official use, so browser # will recognise them as being insecure. # This will use "https://acme-staging-v02.api.letsencrypt.org/directory" useStagingCA: false # additionalDomains can be given to get additional certificates for the given # domains. # additionalDomains: # - "www.database.de" # alternativ path to the webfrontend code. if configured the files here # overload the included webfrontend files. see fylr.resources for more # information on overloading resources. path: "" # oauth2 client configuration to connect to # server. This must match the configuration above. oauth2: # clientID used to connect to oauth2 server clientID: web-client # clientSecret must be provided in clear clientSecret: foo # Optional setting of the URL used to build the token url which is used # for server to server communication to exchange the auth code for a # token defaults to fylr.externalURL # Needs to be set to the port of fylr.services.api.addr internalURL: "http://localhost:8080/" # The reverse proxy can be used to redirect requests to the api # and the backend and also for custom servers behind fylr. reverseProxy+: # The webapp can redirect request to /api and /inspect to the respective # backend services fylr.services.api and fylr.services.backend if # configured in the reverseProxy. # # For /api the webapp has a special mode where itself is serving the # requests. This saves time during the request as it is not passing the # request onto the api server but serving this internally. To activate # this mode, the keyword "bind" must be set in reverseProxy.api. This is # also the default. These requests will be logged as "webapi". api: "http://localhost:8080" # The backend serves the /inspect pages and is used to store and # retrieve files from file based storage locations. It is recommended to # proxy /inspect to the backend server so that users can access /inspect # through the regular fylr url and port. When served through the reverse proxy, # a root login is required to access. backend: "http://localhost:8081" # Custom map for reverse proxy endpoints. fylr uses # https://pkg.go.dev/net/http/httputil#NewSingleHostReverseProxy. Before # the : give a path prefix like /system2 or a domain as //example.com/. # After the : give the URL of the existing content, may contain :port. # The target can omit scheme and host in which case the scheme / host of # the request will be used for the redirection. custom: # show http://localhost:81/system2 at https://externalURL/system2 ``` -------------------------------- ### Full Request Example for Audio Snippet Generation Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-developers/fileversions/recipes-available-via-url.md Example of a full GET request to the API for generating audio snippets using the audioconverter:snippet recipe. ```http GET /api/v1/eas/download/{fileId}/{hash}/{version}&access_token={access_token}&recipe=audioconverter:snippet&recipe_params={params} ``` -------------------------------- ### Restoring with preview images Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/migration/best-practice.md This command shows how to restore data using preview images to speed up the process. It uses `--file-api rput` to have the target fylr load files from the source URL and `--file-version preview` to use a smaller preview image instead of the original. ```bash fylr restore \ --server '/api/v1' \ --login 'root' --password '' \ --client-id '' \ --client-secret '' \ --client-token-url '/api/oauth2/token' \ --manifest '/manifest.json' \ --file-api rput \ --file-version preview \ --purge ``` -------------------------------- ### Example backup command parameters Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/migration/inspect.md This shows how various UI selections in the inspect page translate to command-line parameters for the `fylr backup` command. ```bash --server 'http://example.fylr.xyz/api/v1/' --login root --password '12345' --chunk --all-versions true --include-deleted true --include-events --client-id fylr-web-frontend --client-secret foo ``` -------------------------------- ### Custom IIIF Viewer URLs Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/help/tutorials/for-administrators/how-to-setup-and-use-iiif.md Examples of URLs for embedding custom IIIF viewers, using template replacement for the manifest URL. ```html https://projectmirador.org/embed/?iiif-content=%iiif_presentation_manifest.url% ``` ```html https://codh.rois.ac.jp/software/iiif-curation-viewer/demo/?manifest=%iiif_presentation_manifest.url% ``` -------------------------------- ### Plugin Configuration Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/configuration/fylr.example.yml.md Settings for loading and managing plugins, including paths to plugin directories, URLs for remote plugins, and default configurations. ```yaml plugin: paths: - ../../../easydb-plugins - ../../../fylr-plugins/fylr_example urls: - https://github.com/programmfabrik/fylr-plugin-formula-columns/releases/download/v0.1.2/fylr-plugin-formula-columns.zip default: enabled: false update_policy: "automatic" defaults: fylr_example: enabled: false update: "never" ``` -------------------------------- ### OpenSearch Plugin Installation Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/windows.md Command to install the analysis-icu plugin for OpenSearch. ```bash .\bin\opensearch-plugin install analysis-icu ``` -------------------------------- ### Replace easydb Indexer - Prepare Opensearch directory and start Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/help/tutorials/for-system-administrators/migrate-map-to-local-storage.md Commands to prepare the indexer directory and start Opensearch. ```bash cd /srv/fylr mkdir indexer chown 1000 indexer docker compose up -d opensearch ; docker logs -f opensearch ``` -------------------------------- ### Start initial services Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/linux-docker-compose/multiple-fylrs-in-one-linux.md Commands to pull all necessary Docker images and start the PostgreSQL and OpenSearch services. ```bash docker compose pull docker compose up -d postgresql opensearch ``` -------------------------------- ### Install Fylr as a service command Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-system-administrators/installation/windows.md Command to install Fylr as a service after testing. ```bash fylr.exe server -c fylr.yml --service install ``` -------------------------------- ### Remote URL Prefixes Example Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/help/tutorials/for-system-administrators/migrate-map-to-local-storage-1.md Examples of Remote URL prefixes for easydb partitions, distinguishing between versions and originals. ```text https://easydb.example.com/eas/partitions-inline/2/ (for Versions and) https://easydb.example.com/eas/partitions-inline/1/ (for Originals) ``` -------------------------------- ### XML Export Example Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-developers/user-data-types/daterange.md The XML Export for the example. ```xml 2001 2010 Die erste Dekade im neuen Millennium The first decade in the new millenium ``` -------------------------------- ### String Field Range Example Source: https://github.com/programmfabrik/fylr-gitbook/blob/main/for-users/search-and-filter/expert-search.md Example of how to define a range for string fields. ```text from - to ```