| [05:05:58] | <RUros[m]> | Hello, I need help regarding using Composer on Windows... Currently I am running FarmOS 3.4.6 via Docker on Windows. I would like upgrade to V4 with Composer. My current build is made with docker-compose.yml file (for volume... (full message at <https://matrix.org/oftc/media/v1/media/download/AaO4D8eNjvpQzZHYGhKGy-Bh...) |
| [07:29:26] | <symbioquine[m]> | <RUros[m]> "Hello, I need help regarding..." <- Hopefully there's another Windows user who can help you with that part. However, the first step (maybe you're already doing this) is figuring out how to take a backup and confirming that you know how to restore it successfully without affecting your current production site. (Ideally you'd do so on a separate machine or in a VM so you know it is completely independent.) |
| [07:33:49] | <symbioquine[m]> | symbioquine[m]: Once you've figured out how to do that backup and restore step, make sure you have a known good copy of your backups saved somewhere safe. Then restore the backup on a separate machine or in a VM to create a testing/dev environment where you can experiment without worrying about hurting anything. |
| [07:33:50] | <symbioquine[m]> | As you're learning how to upgrade that testing environment to farmOS v4, make notes for yourself so you can easily repeat the process. Worst case, you might need to make a couple attempts to work out all the hiccups. |
| [07:36:45] | <symbioquine[m]> | Then when you're confident, you can take another backup, (assuming there's been new data put into farmOS) confirm the backup is good, and repeat your upgrade process on your production site. |
| [09:05:55] | <mstenta[m]> | RUros: Make sure you update to 3.5.1 before 4.0.1 |
| [09:06:26] | <mstenta[m]> | There are required database updates in it that need to be run before upgrading to 4.x. |
| [09:07:47] | <mstenta[m]> | Have you read this documentation? https://farmos.org/hosting/composer/ |
| [09:07:56] | <mstenta[m]> | That explains the basic concepts and process for managing your codebase with Composer. |
| [09:08:34] | <mstenta[m]> | And at the end it provides an example for running Composer inside a Docker image. |
| [09:09:28] | <mstenta[m]> | > What I am asking is: Is Composer on Windows appropriate method to build my codebase or should I do this inside Docker (via separate container, dedicated for Composer) ? |
| [09:09:28] | <mstenta[m]> | I would recommend running everything in a Docker container. |
| [09:09:38] | <mstenta[m]> | It sounds like you are already familiar with running farmOS in Docker. |
| [09:10:28] | <mstenta[m]> | The nice thing about running Composer commands in Docker too is that you can be sure that all of the system requirements (PHP version, PHP extensions, etc) are in place... and you don't need to mess around at all with PHP/Composer in Windows. |
| [09:10:55] | <mstenta[m]> | AND if farmOS changes requirements in the future, you can just use the new Docker image with those requirements... no need to worry about updating them in Windows. |
| [09:12:37] | <mstenta[m]> | So... once you've done all the things symbioquine described (to be confident that you won't break anything on your "live" database), I would say the best next step is to read all of https://farmos.org/hosting/composer/ and then create your own custom `composer.json` and `Dockerfile` that you can use to build your own farmOS Docker image, with all of the add-on modules you want. |
| [09:13:05] | <mstenta[m]> | You can basically test that in parallel without touching your existing 3.x instance. |
| [09:14:12] | <mstenta[m]> | That will give you confidence that you have all the requirements in place, and you can install a fresh farmOS v4 database from scratch to confirm... then blow it away and import your 3.x database, and perform the normal upgrade steps described here: https://farmos.org/hosting/update/ |
| [09:14:33] | <mstenta[m]> | Please note: if you are using PostgreSQL you will need version 16 or higher. This is a new requirement for Drupal 11 (which farmOS v4 runs on). |
| [09:15:00] | <mstenta[m]> | So, you may want to run two PostgreSQL containers in parallel... one for v3 and one for v4. |
| [09:15:09] | <mstenta[m]> | That way, you are never actually touching your old database at all. |
| [09:16:03] | <mstenta[m]> | You can dump a snapshot of your v3 database, spin up a new PostgreSQL 17 container, and import the snapshot into that, so you can test the v4 upgrade and easily roll back if you need to. |
| [09:16:20] | <mstenta[m]> | Hope that helps... good luck! :-) |
| [09:17:21] | <mstenta[m]> | > But when trying to build project there are several error and warnings like: security warnings, php extension missing, etc. Some of them I solved successfully. But still cannot get through. |
| [09:17:21] | <mstenta[m]> | Oh, and feel free to post your errors here... although I bet a lot of them will go away when you build inside a Docker container. |
| [09:26:50] | <mstenta[m]> | <Greg[m]> "yes... I like that approval flow..." <- Here is the intake review form: https://github.com/farmier/farm_rcd/blob/1.x/src/Form/IntakeReviewForm.php |
| [09:27:03] | <mstenta[m]> | mstenta[m]: We basically just embed that in the top of intake logs, but only show it if they have a status of "pending" |
| [09:27:54] | <mstenta[m]> | mstenta[m]: That happens here: https://github.com/farmier/farm_rcd/blob/2d3b650b2d298afe3e5d4b8ebfe6404... |