Hi Sebastien,
Though I don't have the answers, I do share your questions! I've been
rooting around trying to figure out these same problems, since I'm
interested in running FreshRSS on a VPS.
On 6/26/25 6:47a, Sébastien Gendre wrote:
The first step would be to define a Guix package.
But what about a PHP web app that ask you to remove an `install.php'
file from its source directory after the first run and who store the
data as files in a sub-folder of their source code ? I remember a forum
written like that (can't remember the name, it was an hold school forum
and a free software).
I also suspect these kinds of web apps would work by providing the
upstream snapshot of their "working directory" in a store item, and then
having a service that copies that working directory to the proper place.
But what about the integration with the database or other softwares ?
Does the new web app service type need to extend the service type of the
database ? Or do we use the web app service configuration to tell which
database to use and how to connect to it ? Same questions for the
reverse proxy, the cache software, etc.
Regarding databases and other interactions, I feel like your intuition
is in the right place. I would reason that it makes sense to extend the
target service, since configuration is required in both the client and
host service (I'd imagine a database service would need configuration
for each "client" program using it). Can extensions be parameterized, or
are they static for a given service-type? Perhaps service-types can be
generated from a procedure? I'm imagining a "freshrss-configuration"
field that accepts a service-type as its #:database argument.
The extension of other service types for the database, the cache, etc,
is the most easy to use for the admin sys. But it will not permit to
have the web app on one host, the database on another, etc.
Perhaps there could be a "remote-database-connection" service?
And what about when the web app ask to run a script on first run, or to
manually create a database: What would be the best way to integrate it
in Guix System ?
I would guess these would work as "oneshot" services that check if a
configuration action was done, and does it if necessary. This is the
category of services that, e.g. configures your shell and environment
variables.
For running the web app instance, the best way is to create a Shepherd
service ? But what about running multiple instances on the same
machine ? Do the new web app service type need to manage it itself ? Or
do we ask admin sys to run one instance per system and use system
containers to have multiple instances in the same machine ?
Perhaps the "term-tty{1,2,3...}" services can be of reference here.