| 16:20 | * | shplorf[m] has joined |
| 16:22 | shplorf[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:23 | symbioquine[m] | That isn't directly configurable via an environment variable since it is part of Drupal's configuration. |
| 16:23 | symbioquine[m] | That said, there are ways to accomplish what I think you're trying to do. |
| 16:25 | shplorf[m] | I see, what is the pattern for configuring Drupal? Is there a config file I can mount? |
| 16:25 | shplorf[m] | Thanks for the quick reply BTW! |
| 16:27 | symbioquine[m] | You need to deal with the question of how two different scenarios get handled; |
| 16:27 | symbioquine[m] | * Under normal (everyday) start-up conditions, drupal is already configured |
| 16:27 | symbioquine[m] | * Under first-time start-up conditions you need to configure one or more drupal "sites" |
| 16:27 | symbioquine[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:28 | symbioquine[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:28 | shplorf[m] | Ah makes sense, so the DB hostname is configured in the UI on initial start-up? |
| 16:29 | symbioquine[m] | Yes |
| 16:29 | symbioquine[m] | symbioquine[m]: e.g. github.com/symbioquine/farmOS_wfs/blob/3 |
| 16:30 | symbioquine[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:30 | symbioquine[m] | Then presumably, you can decide what a production deployment looks like for you and what bits need to be automated. |
| 16:32 | shplorf[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:34 | mstenta[m] | shplorf: this documents available "build arguments": farmos.org/development/environment/docke |
| 16:35 | mstenta[m] | farmOS docker images don't make use of any persistent ENV variables (at least not off the top of my head) |
| 16:36 | symbioquine[m] | It's not hard to wire it up to do so though. e.g. blog.chrismitchellonline.com/posts/drupa |
| 16:37 | mstenta[m] | The base images that farmOS builds upon (PHP, Drupal, etc) may have some, I'm not sure |
| 16:37 | symbioquine[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:38 | symbioquine[m] | and the related issue: www.drupal.org/project/drupal/issues/282 |
| 16:38 | mstenta[m] | Yea Drupal itself doesn't use environment variables, that I know of |
| 16:39 | symbioquine[m] | Another example of wiring up Drupal to honor environment variables: github.com/geerlingguy/drupal-container/ |
| 16:40 | symbioquine[m] | Another relevant issue: www.drupal.org/project/drupal/issues/287 |
| 16:40 | shplorf[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:41 | symbioquine[m] | Pro tip: Spend the energy on learning to take/restore backups first |
| 16:41 | symbioquine[m] | Then you can iterate on your setup more easily in the future (and sleep well at night) |
| 16:42 | shplorf[m] | Which is just the farm DB + /opt/drupal/web/sites, right? That's where all the state lives? |
| 16:43 | symbioquine[m] | This is what I do...... (full message at <matrix.org/_matrix/media/v3/download/mat>) |
| 16:44 | symbioquine[m] | Then I run it as a cron job from another container;... (full message at <matrix.org/_matrix/media/v3/download/mat>) |
| 16:45 | shplorf[m] | Makes sense, thanks! |
| 16:47 | symbioquine[m] | **farmos_wipe_and_recreate_from_backup.sh**... (full message at <matrix.org/_matrix/media/v3/download/mat>) |
| 16:47 | symbioquine[m] | s/**farmos_wipe_and_recreate_from_backup/**`farmos\_wipe\_and\_recreate\_from\_backup/, s/**/`**/ |
| 16:47 | symbioquine[m] | s/**/**`/, s/**/`**/ |
| 16:48 | symbioquine[m] | s/*/**`/, s/*:/`**:/ |
| 16:48 | symbioquine[m] | A lot of that is fairly specific to hosting in Docker Compose, but hopefully is still instructive. |
| 16:53 | symbioquine[m] | There might be better ways to do all that too. I'm by no means an expert in managing Drupal installs 🌱 |
| 18:10 | shplorf[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:11 | mstenta[m] | Site name in the context of farmOS is usually the farm name |
| 18:12 | mstenta[m] | (Might be a good idea to override the Drupal default form to make that more clear... 🤔) |
| 18:12 | shplorf[m] | OK, and this can be a "pretty" name, so it can contain spaces n stuff? |
| 18:12 | mstenta[m] | Yup! |
| 18:13 | mstenta[m] | "Shplorf's Gourmet Beet Farm" :-) |