1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-05-27 19:41:50 +02:00

services: Add miniflux-service-type.

* doc/guix.texi: Document Miniflux service and configuration.
* gnu/services/web.scm: New service.
* gnu/services/web.scm: Define shepherd service and account roles.
* gnu/tests/web.scm: (%miniflux-create-admin-credentials,
miniflux-base-system, %test-miniflux-admin-string, %test-miniflux-admin-file,
%test-miniflux-socket): Add system tests for Miniflux service.

Change-Id: I4a336e677ec8b46aed632f0ded9cc11c2d38975f
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Rodion Goritskov
2025-07-19 10:52:11 +02:00
committed by Ludovic Courtès
parent d411aff611
commit 054aae7bb2
3 changed files with 461 additions and 2 deletions
+75
View File
@@ -144,6 +144,7 @@ Copyright @copyright{} 2024 Evgeny Pisemsky@*
Copyright @copyright{} 2025 jgart@*
Copyright @copyright{} 2025 Artur Wroblewski@*
Copyright @copyright{} 2025 Edouard Klein@*
Copyright @copyright{} 2025 Rodion Goritskov@*
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -35700,6 +35701,80 @@ The file which should store the logging output of Agate.
@end table
@end deftp
@subsubheading Miniflux
@cindex miniflux
The @uref{https://miniflux.app/, Miniflux} is a minimalist RSS feed reader
with a web interface.
Depending on the configuration, an initial administrator user can be pre-created
on startup. To enable this, @code{create-admin?} should be set to @code{#t}, and
both @code{admin-username-file} and @code{admin-password-file} should point to
files containing the username and password, respectively. However, it is
recommended to manually change the password to a secure one via the web
UI after the initial service startup.
@defvar miniflux-service-type
This is the type of the Miniflux service. Its value
must be a @code{miniflux-configuration} record as in this example:
@lisp
(service miniflux-service-type
(miniflux-configuration
(listen-address "0.0.0.0:8080")
(base-url "http://my-news-source.test")
(create-administrator-account? #t)
(administrator-account-name "/var/miniflux/initial-admin-username")
(administrator-account-password "/var/miniflux/initial-admin-password")))
@end lisp
The details of the @code{miniflux-configuration} record type are given below.
@end defvar
@deftp {Data Type} miniflux-configuration
Available @code{miniflux-configuration} fields are:
@table @asis
@item @code{listen-address} (default: @code{"127.0.0.1:8080"}) (type: string)
Address to listen on.
Use absolute path like @code{"/var/run/miniflux/miniflux.sock"} for a Unix socket.
@item @code{base-url} (default: @code{"http://127.0.0.1/"}) (type: string)
Base URL to generate HTML links and base path for cookies.
@item @code{create-administrator-account?} (default: @code{#f}) (type: boolean)
Create an initial administrator account.
@item @code{administrator-account-name} (type: maybe-string-or-file-path)
Initial administrator account name as a string or an absolute path
to a file with an account name inside.
@item @code{administrator-account-password} (type: maybe-string-or-file-path)
Initial administrator account password as a string or an absolute path
to a file with a password inside.
@item @code{run-migrations?} (default: @code{#t}) (type: boolean)
Run database migrations during application startup.
@item @code{database-url} (default: @code{"host=/var/run/postgresql"}) (type: string)
PostgreSQL connection string.
@item @code{user} (default: @code{"miniflux"}) (type: string)
User name for Postgresql and system account.
@item @code{group} (default: @code{"miniflux"}) (type: string)
Group for the system account.
@item @code{log-file} (default: @code{"/var/log/miniflux.log"}) (type: string)
Path to the log file.
@item @code{extra-settings} (type: maybe-list)
Extra configuration parameters as a list of strings.
@end table
@end deftp
@node High Availability Services
@subsection High Availability Services