< 132024-01-14⋎15 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
16:20*shplorf[m] has joined
16:22shplorf[m]Hi, I'm just working on deploying the FarmOS Docker image. Is there anywhere I can find documentation of all the environment variables it can be configured with? I'm having trouble locating this info in the docs/GitHub. For example, I'd like to configure the DB hostname.
16:23*symbioquine[m] has joined
16:23symbioquine[m]That isn't directly configurable via an environment variable since it is part of Drupal's configuration.
16:23symbioquine[m]That said, there are ways to accomplish what I think you're trying to do.
16:25shplorf[m]I see, what is the pattern for configuring Drupal? Is there a config file I can mount?
16:25shplorf[m]Thanks for the quick reply BTW!
16:27symbioquine[m]You need to deal with the question of how two different scenarios get handled;
16:27symbioquine[m]* Under normal (everyday) start-up conditions, drupal is already configured
16:27symbioquine[m]* Under first-time start-up conditions you need to configure one or more drupal "sites"
16:27symbioquine[m]Many folks code their Docker setups for the everyday scenario and do the configuration manually on first start-up before using Drupal/farmOS.
16:28symbioquine[m]But it is possible to encode how you want that configuration to occur into your Docker image or something like a docker-compose.yml file...
16:28shplorf[m]Ah makes sense, so the DB hostname is configured in the UI on initial start-up?
16:29symbioquine[m]Yes
16:29symbioquine[m]symbioquine[m]: e.g. github.com/symbioquine/farmOS_wfs/blob/3
16:30symbioquine[m]If you're just getting started, you probably want to spin up the Docker container with the minimal amount of custom stuff and use the UI to configure Drupal/farmOS (including the DB connection info)
16:30symbioquine[m]Then presumably, you can decide what a production deployment looks like for you and what bits need to be automated.
16:32shplorf[m]Makes sense, thanks! I do see some things configured via env vars in some of the examples/docs, so I'd still be interested in a comprehensive list of all possible env vars I can set for the image, if that exists.
16:34mstenta[m]shplorf: this documents available "build arguments": farmos.org/development/environment/docke
16:35mstenta[m]farmOS docker images don't make use of any persistent ENV variables (at least not off the top of my head)
16:36symbioquine[m]It's not hard to wire it up to do so though. e.g. blog.chrismitchellonline.com/posts/drupa
16:37mstenta[m]The base images that farmOS builds upon (PHP, Drupal, etc) may have some, I'm not sure
16:37symbioquine[m]I suspect there's very few (of the "set the DB URL" variety) because there's open issues like: www.drupal.org/project/drupal/issues/250
16:38symbioquine[m]and the related issue: www.drupal.org/project/drupal/issues/282
16:38mstenta[m]Yea Drupal itself doesn't use environment variables, that I know of
16:39symbioquine[m]Another example of wiring up Drupal to honor environment variables: github.com/geerlingguy/drupal-container/
16:40symbioquine[m]Another relevant issue: www.drupal.org/project/drupal/issues/287
16:40shplorf[m]Awesome, thanks all, I have a tendency to over-engineer stuff by trying to anticipate what I'd like to change down the road, sounds like I just need to spin it up and worry about how to change/configure things when I actually find something I'd like to change/configure.
16:41symbioquine[m]Pro tip: Spend the energy on learning to take/restore backups first
16:41symbioquine[m]Then you can iterate on your setup more easily in the future (and sleep well at night)
16:42shplorf[m]Which is just the farm DB + /opt/drupal/web/sites, right? That's where all the state lives?
16:43symbioquine[m]This is what I do...... (full message at <matrix.org/_matrix/media/v3/download/mat>)
16:44symbioquine[m]Then I run it as a cron job from another container;... (full message at <matrix.org/_matrix/media/v3/download/mat>)
16:45shplorf[m]Makes sense, thanks!
16:47symbioquine[m]**farmos_wipe_and_recreate_from_backup.sh**... (full message at <matrix.org/_matrix/media/v3/download/mat>)
16:47symbioquine[m]s/**farmos_wipe_and_recreate_from_backup/**`farmos\_wipe\_and\_recreate\_from\_backup/, s/**/`**/
16:47symbioquine[m]s/**/**`/, s/**/`**/
16:48symbioquine[m]s/*/**`/, s/*:/`**:/
16:48symbioquine[m]A lot of that is fairly specific to hosting in Docker Compose, but hopefully is still instructive.
16:53symbioquine[m]There might be better ways to do all that too. I'm by no means an expert in managing Drupal installs 🌱
18:10shplorf[m]In the initial configuration on connecting to the container, is the "Site Name" the hostname where farmos will be deployed? What is that string used for?
18:11mstenta[m]Site name in the context of farmOS is usually the farm name
18:12mstenta[m](Might be a good idea to override the Drupal default form to make that more clear... 🤔)
18:12shplorf[m]OK, and this can be a "pretty" name, so it can contain spaces n stuff?
18:12mstenta[m]Yup!
18:13mstenta[m]"Shplorf's Gourmet Beet Farm" :-)

< 132024-01-14⋏15 >