[19:02:48] | <mstenta[m]> | Ok so... actually the image update did work! |
[19:02:56] | <mstenta[m]> | I can tell by PHP 8.3 |
[19:03:14] | <mstenta[m]> | (It worked before too) |
[19:03:51] | <mstenta[m]> | But... there is another consideration (the second possibility I mentioned above, after all) |
[19:04:41] | <mstenta[m]> | Because you are mounting the entire /opt/drupal directory as a volume... that is the whole farmOS codebase (including Drupal core) |
[19:14:32] | <mstenta[m]> | The "development environment" documentation on farmOS.org recommends mounting /opt/drupal, so that you can load everything into an IDE |
[19:14:53] | <mstenta[m]> | So my first question is: is that your intention? |
[19:14:59] | <mstenta[m]> | To do development? |
[19:15:22] | <mstenta[m]> | If so, then updating the farmOS codebase is more involved than just pulling a new image |
[02:10:45] | <postmanpat[m]> | Aha.. I kind a suspected this, so tried to change the volume to ...web/sites. Then I got some errors about wrong config files. |
[02:11:02] | <postmanpat[m]> | <mstenta[m]> "So my first question is: is that..." <- No, I don't need that |
[02:13:16] | <postmanpat[m]> | This is BTW the same case with my procduction stack. |
[02:13:16] | <postmanpat[m]> | The dev image was the first farmOS I managed to run, so went from there. |
[07:39:25] | <postmanpat[m]> | I fooled around a bit today on the dev-stack. Trying to fix my volume mounting. I was aware it could break things, but it's okay this case.... (full message at <https://matrix.org/oftc/media/v1/media/download/AYZF4KBL67qCdxeQ5GJ0nK2z...) |
[07:40:15] | <mstenta[m]> | Good morning postmanpat! It seems we are on the same schedule 😆 |
[07:40:51] | <mstenta[m]> | Great! Well at least we know how to solve it :-) |
[07:41:04] | <mstenta[m]> | Curious what broke when you changed the volume mount |
[07:41:10] | <postmanpat[m]> | Haha..... (full message at <https://matrix.org/oftc/media/v1/media/download/AdHuZ6C9J1EyAvW77dnfhgeU...) |
[07:42:13] | <mstenta[m]> | You'll have to make sure the directory you mount into /opt/drupal/web/sites is ONLY the sites directory |
[07:42:25] | <postmanpat[m]> | mstenta[m]: Yea, me too. I did some bad volume mounts and that propably made things worse. |
[07:42:35] | <mstenta[m]> | So eg, if you were doing - './farmos-www:/opt/drupal', then it would become - './farmos-www/web/sites:/opt/drupal/web/sites' |
[07:42:47] | <mstenta[m]> | (adding web/sites to both sides) |
[07:43:24] | <mstenta[m]> | But ultimately, you don't need everything else in ./farmos-www, so you might want to just move www/sites out of that, and then just have `- './sites:/opt/drupal/web/sites' |
[07:43:26] | <postmanpat[m]> | Ok. and then everything should work out of the box? |
[07:43:28] | <mstenta[m]> | (or something like that) |
[07:43:33] | <mstenta[m]> | * But ultimately, you don't need everything else in ./farmos-www, so you might want to just move www/sites out of that, and then just have `- './sites:/opt/drupal/web/sites'` |
[07:43:40] | <mstenta[m]> | Should |
[07:43:43] | <mstenta[m]> | :-) |
[07:44:09] | <mstenta[m]> | But since you are also presumably upgrading farmOS at the same time, be sure to also run update.php, clear cache, etc |
[07:44:24] | <postmanpat[m]> | If it messes up, it's the sites backup that needs restore right? |
[07:45:54] | <mstenta[m]> | In theory nothing will get changed in the sites directory if something gets messed up. More likely that something breaks in the database, so that's what would need restore. |
[07:46:09] | <mstenta[m]> | The database has a lot of state and the structure of it needs to match the codebase |
[07:46:30] | <mstenta[m]> | So if you update the codebase, and the database doesn't get updated accordingly (if it need to), then things can break |
[07:47:03] | <mstenta[m]> | But the sites directory just contains settings.php (with db credentials) and uploaded files, mostly, so not much will break in there (it also includes cached CSS and JS, but clearing the cache wipes those) |
[07:49:17] | <postmanpat[m]> | <mstenta[m]> "But ultimately, you don't need..." <- Not sure if I got that.. please specify if the paths are docer-side og on the volume |
[07:59:44] | <mstenta[m]> | ./farmos-www is a directory on your host |
[07:59:56] | <mstenta[m]> | ./opt/drupal is the directory inside the Docker container |
[08:00:18] | <mstenta[m]> | when you bind-mount a volume, it makes everything that is in ./farmos-www appear inside the docker container in ./opt/drupal |
[08:00:55] | <mstenta[m]> | /opt/drupal is meant to be the entire Drupal/farmOS codebase, and /opt/drupal/web/sites is just the stateful files like settings.php and uploaded photos |
[08:02:07] | <mstenta[m]> | So if you started with ./farmos-www:/opt/drupal as your volume config, then your local ./farmos-www folder will contain the whole Drupal/farmOS codebase |
[08:02:36] | <mstenta[m]> | But if you are switching to only mounting the sites directory, you don't need to have any of the Drupal/farmOS codebase in a local directory |
[08:02:44] | <mstenta[m]> | You only need sites |
[08:03:05] | <mstenta[m]> | So what I would probably do is: |
[08:03:05] | <mstenta[m]> | `mv ./farmos-www/web/sites ./farmos-sites` |
[08:03:22] | <mstenta[m]> | Then mount ./farmos-sites:/opt/drupal/web/sites |
[08:03:33] | <mstenta[m]> | And delete ./farmos-www |
[08:03:44] | <mstenta[m]> | Make sense? |
[08:11:05] | <postmanpat[m]> | Indeed. Thanks 🙏 |
[11:19:40] | * aathiappan has joined #farmos |
[11:57:17] | <symbioquine[m]> | farmOS dev call starts in a few minutes! All are welcome! https://meet.jit.si/farmos-dev |
[18:38:20] | <postmanpat[m]> | <mstenta[m]> "Make sense?" <- I moved this to the [forum](https://farmos.discourse.group/t/farmos-will-not-update-wrong-volume-mou...) to document the process. I've cloned the production environment, and can test the change of volum mounting. It looks similar to what happened to my dev environment. |
[18:38:20] | <postmanpat[m]> | Right now I have a missing document module to put me to sleep. Don't think it's the farm_document module I'm missing. |