| [19:36:11] | * scrdcow[m] has quit (Ping timeout: 268 seconds) |
| [19:36:11] | * sgoodall[m] has quit (Ping timeout: 268 seconds) |
| [19:36:11] | * jgaehring[m] has quit (Ping timeout: 268 seconds) |
| [19:36:46] | * ludwa6[m]1 has quit (Ping timeout: 268 seconds) |
| [19:36:46] | * MarcosCarballal[ has quit (Ping timeout: 268 seconds) |
| [19:36:46] | * skipper_is[m] has quit (Ping timeout: 268 seconds) |
| [19:42:22] | * scrdcow[m] has joined #farmos |
| [19:43:21] | * sgoodall[m] has joined #farmos |
| [19:44:16] | * jgaehring[m] has joined #farmos |
| [19:45:12] | * ludwa6[m]1 has joined #farmos |
| [19:45:17] | * MarcosCarballal[ has joined #farmos |
| [19:45:27] | * skipper_is[m] has joined #farmos |
| [15:38:12] | <MarcosCarballal[> | ACTION uploaded an image: (634KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/rTVqjxeZtcK... > |
| [15:38:13] | <MarcosCarballal[> | Hey all :). |
| [15:38:13] | <MarcosCarballal[> | I am trying to do a Dockerless deployment of vanilla farmOS. I have PHP7.4 and Apache installed. |
| [15:38:13] | <MarcosCarballal[> | This may just be a result of me misunderstanding how to use composer, but when I attempt to install dependencies, it doesn't seem to like it. |
| [15:38:13] | <MarcosCarballal[> | |
| [15:38:58] | <mstenta[m]> | Hi Marcos Carballal ! |
| [15:39:11] | <mstenta[m]> | Ah yea no worries... That part is a bit misleading actually |
| [15:39:27] | <mstenta[m]> | farmOS should be thought of as a dependency of your project |
| [15:39:38] | <mstenta[m]> | So we have a template for starting a new project |
| [15:39:47] | <mstenta[m]> | One sec... Just getting home, will send info .. |
| [15:40:04] | <MarcosCarballal[> | Awesome thanks! |
| [15:43:02] | <mstenta[m]> | In a new directory try this: |
| [15:43:29] | <mstenta[m]> | composer create-project farmos/project |
| [15:43:52] | <mstenta[m]> | You never need to check out the farmOS repo directly |
| [15:44:53] | <mstenta[m]> | This will set you up with a composer.json file that you will "own" moving forward. And it will run composer install automatically. |
| [15:45:11] | <mstenta[m]> | There's various ways to manage drupal deployments via composer |
| [15:45:26] | <mstenta[m]> | One option is to commit everything that gets created into a repo |
| [15:45:54] | <mstenta[m]> | Or you can gitignore stuff that composer manages |
| [15:46:11] | <MarcosCarballal[> | It would be great to have a solution where we don't have to checkout farmOS repo directly |
| [15:46:14] | <MarcosCarballal[> | ACTION uploaded an image: (157KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/XTMQpCibedD... > |
| [15:49:25] | <MarcosCarballal[> | Ah, passing "-s dev" seems to have done it |
| [15:51:11] | <mstenta[m]> | Ah there ya go |
| [15:51:26] | <MarcosCarballal[> | Still spit out errors unfortunately |
| [15:52:19] | <mstenta[m]> | brb - I'm with the kids right now |
| [15:52:37] | <MarcosCarballal[> | All good! This is not urgent |
| [15:54:16] | <mstenta[m]> | Back (for the moment) :-) |
| [15:54:57] | <mstenta[m]> | To be honest, I never use this approach myself (always Docker), so I need to remember... |
| [15:55:18] | <mstenta[m]> | BUT, that being said, this is exactly what is done as part of the Docker image build process |
| [15:55:33] | <mstenta[m]> | So it does work, as is the basis for the image :-) |
| [15:55:57] | <mstenta[m]> | I'll share a link to the relevant Dockerfile code... |
| [15:56:48] | <mstenta[m]> | Here is the line in the Dockerfile: https://github.com/farmOS/farmOS/blob/30f70615b949291f04d29ea78c4007d2a6... |
| [15:56:51] | <MarcosCarballal[> | I think I found the Dockerfile already. I have been trying to translate it for RHEL 7.9 |
| [15:57:01] | <mstenta[m]> | That calls our `build-farmOS.sh` script: https://github.com/farmOS/farmOS/blob/2.x/docker/build-farmOS.sh |
| [15:58:16] | <mstenta[m]> | Ah actually I'm wrong... we don't actually call `composer create-project` anymore... used to... now we basically do the same thing that it does, but a bit more manually (so that this script can be used in other contexts like automated testing etc) |
| [15:58:35] | <mstenta[m]> | `composer create-project farmos/project` basically does two things: it downloads the template `composer.json` and then runs `composer install` |
| [15:58:58] | <mstenta[m]> | here is the template it downloads, you can download it manually: https://github.com/farmOS/composer-project |
| [15:59:40] | <mstenta[m]> | try this: |
| [15:59:43] | <mstenta[m]> | wget https://raw.githubusercontent.com/farmOS/composer-project/2.x/composer.json |
| [15:59:44] | <mstenta[m]> | composer install |
| [16:00:16] | <mstenta[m]> | oh wait... you probably want `composer install --no-dev` |
| [16:00:43] | <mstenta[m]> | (if this is a production deployment you don't want dev dependencies) |
| [16:00:47] | <MarcosCarballal[> | Okay, running that now. |
| [16:01:01] | <MarcosCarballal[> | This isn't a production deployment, just trying to provide an environment for devs. |
| [16:01:20] | <MarcosCarballal[> | But since we are not going to be able to use Docker in USDA, we are trying to learn the Dockerless deployment |
| [16:02:46] | <mstenta[m]> | Cool |
| [16:03:03] | <mstenta[m]> | Yea "dev dependencies" in this case might be more geared towards farmOS core development anyway |
| [16:03:29] | <mstenta[m]> | Although if you are doing module development you may find some things useful |
| [16:03:58] | <mstenta[m]> | But I would highly recommend devs use these instructions: https://farmos.org/development/environment/ (using Docker) |
| [16:04:05] | <mstenta[m]> | even if your ultimate deployment is not Docker |
| [16:04:18] | <MarcosCarballal[> | That's what I've been suggesting too. |
| [16:04:20] | <mstenta[m]> | but it's up to you! if y'all are comfortable developing outside of docker |
| [16:05:02] | <MarcosCarballal[> | ACTION uploaded an image: (365KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/RTQzXwiVtSL... > |
| [16:05:18] | <MarcosCarballal[> | Used to have way more problems than this, can't get rid of this one though |
| [16:06:14] | <MarcosCarballal[> | Is "composer require <package>" "composer install" the correct approach? |
| [16:06:28] | <mstenta[m]> | That means that your PHP installation doesn't have the simplexml extension (I think) |
| [16:06:46] | <mstenta[m]> | (included in the Docker image) :-P |
| [16:07:44] | <mstenta[m]> | `composer require <package>` will "install" a package into your codebase... you only run `composer install` the *first* time you are starting the project |
| [16:08:49] | <mstenta[m]> | (and to be clear, this only gets the code into place... it has nothing to do with Drupal or the database) |
| [16:09:58] | <mstenta[m]> | i'm not sure why your PHP installation doesn't have SimpleXML... according to this it should be enabled by default: https://www.php.net/manual/en/simplexml.installation.php |
| [16:10:08] | <mstenta[m]> | > This extension is enabled by default. It may be disabled by using the following option at compile time: --disable-simplexml |
| [16:10:46] | <mstenta[m]> | oh ... what version of PHP are you running? |
| [16:10:51] | <MarcosCarballal[> | Rhel doesn't update the PHP so I had to get it from a repository that goes by the name "remi". I was able to get simplexml |
| [16:10:54] | <MarcosCarballal[> | 7.4 |
| [16:11:05] | <mstenta[m]> | OK good - PHP 7.4 is what you need :-) |
| [16:11:12] | <MarcosCarballal[> | But the "official" pathway to get PHP on RHEL gives me some 5.x version... |
| [16:11:14] | <mstenta[m]> | Oh cool |
| [16:11:19] | <mstenta[m]> | Oh weird |
| [16:11:42] | <mstenta[m]> | I don't have a lot of experience with RHEL (except years and years ago) |
| [16:12:42] | <mstenta[m]> | Ah yea I'm seeing comments on that page... |
| [16:12:48] | <mstenta[m]> | > This XML module is not provided on a default php (v7) install on Debian GNU/Linux stretch (9.3) |
| [16:12:48] | <mstenta[m]> | Add it with: sudo apt-get install php-xml |
| [16:12:53] | <MarcosCarballal[> | My experience with RHEL spans about 2-3 weeks |
| [16:12:57] | <mstenta[m]> | > To install on CentOS and Redhat, run: sudo yum -y install php-xml |
| [16:13:23] | <MarcosCarballal[> | Slowly installing all of the PHP extensions |
| [16:23:36] | <MarcosCarballal[> | ACTION uploaded an image: (404KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/MLTpfZQKLzY... > |
| [16:23:43] | <MarcosCarballal[> | Another error I can't seem to parse/ google for |
| [16:24:48] | <mstenta[m]> | Oh... |
| [16:25:17] | <mstenta[m]> | I know what's causing that... |
| [16:26:02] | <mstenta[m]> | in your `composer.json` change `"farmos/farmos": "2.x-dev",` to `"farmos/farmos": "^2.0@beta",` |
| [16:26:24] | <mstenta[m]> | i should update that in our template now that we released beta |
| [16:26:41] | <mstenta[m]> | that will ensure that you use a tagged release, not the `2.x` dev branch |
| [16:27:39] | <mstenta[m]> | alternatively you can set it to `2.0.0-beta1` explicitly |
| [16:27:57] | <mstenta[m]> | so that you can maintain that more intentionally moving forward, and manually update when new releases come out |
| [16:28:32] | <MarcosCarballal[> | ACTION sent a code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/1d81730627... |
| [16:28:34] | <mstenta[m]> | (we need to document this "composer workflow" for hosting... right now we only "officially" document the docker and tarball approaches) |
| [16:28:46] | <mstenta[m]> | (this is the more complicated route, of course) :-) |
| [16:28:50] | <MarcosCarballal[> | ACTION sent a code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/43bf1866ea... |
| [16:29:34] | <mstenta[m]> | try `"farmos/farmos": "2.0.0-beta1",` |
| [16:30:59] | <mstenta[m]> | i'm refreshing on exactly what `build-farmOS.sh` does... i think that |
| [16:31:02] | <MarcosCarballal[> | Composer update runs fine with "2.0.0-beta1". Composer isntall is failing with the same "cannot apply patch" failure though. |
| [16:32:35] | <mstenta[m]> | delete everything except your `composer.json` and try `composer install` again |
| [16:32:51] | <mstenta[m]> | (did it create `composer.lock` and other stuff?) |
| [16:34:10] | <MarcosCarballal[> | Deleted everything, ran it again, still the error unfortunately 😕 |
| [16:34:32] | <MarcosCarballal[> | ACTION sent a code block: https://libera.ems.host/_matrix/media/r0/download/libera.chat/5d45b5b724... |
| [16:34:43] | <MarcosCarballal[> | There's the full composer.json |
| [16:35:14] | <mstenta[m]> | hmm not sure if it matters, but remove the `^` before `2.0.0-beta1` |
| [16:35:41] | <mstenta[m]> | i don't think that will matter... but worth a try |
| [16:36:08] | <mstenta[m]> | otherwise i'll have to try this on my end to have a closer look |
| [16:36:18] | <MarcosCarballal[> | Doesn't even find the package without it. |
| [16:36:36] | <MarcosCarballal[> | Okay! I will keep playing around with it. |
| [16:36:56] | <mstenta[m]> | oh wow! you're right! i'm seeing that `2.0.0-beta1` is not listed in https://packagist.org/packages/farmOS/farmOS! |
| [16:37:06] | <mstenta[m]> | lemme update that... one sec |
| [16:37:27] | <mstenta[m]> | OK! try again now... without the `^` :-) |
| [16:38:28] | <mstenta[m]> | packagist (where composer gets it's package info) updates that automatically... but we had to swap the repo url in there when we tagged beta1, so maybe it just needed a manual update for this first release |
| [16:38:46] | <MarcosCarballal[> | Well it found it, but still failed. Is Drupal 8 in the repositories > url correct? |
| [16:38:58] | <mstenta[m]> | still failed with the patch error? |
| [16:39:02] | <MarcosCarballal[> | Yup |
| [16:40:44] | <MarcosCarballal[> | ACTION uploaded an image: (20KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/MMfjZuxiddh... > |
| [16:40:53] | <MarcosCarballal[> | Dockerfile shows Drupal 9 but here we are grabbing Drupal 8 |
| [16:40:59] | <mstenta[m]> | Hmm. I'm not sure why... tl;dr: that patch was needed for Drupal 9.3.0 but not for Drupal 9.3.2, so we've already removed it in `2.x` - the only reason it would fail to apply is if you are not actually getting Drupal 9.3.0 i think... but according to that screenshot it's 9.3.0 |
| [16:41:34] | <mstenta[m]> | oh what? drupal 8? |
| [16:41:50] | <MarcosCarballal[> | Line 15 in the composer.json I sent you |
| [16:41:53] | <mstenta[m]> | farmOS is built on D9 - are you seeing D8 somewhere? |
| [16:42:26] | <mstenta[m]> | OOOH ok yea... that's just the drupal packagist URL |
| [16:42:30] | <mstenta[m]> | ignore that :-) |
| [16:43:26] | <paul121[m]> | ACTION uploaded an image: (5KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/FdbSiUXHSFT... > |
| [16:43:27] | <paul121[m]> | packagist farmOS/farmOS has a weird timestamp for beta1 ? |
| [16:43:45] | <mstenta[m]> | that's probably when i actually tagged it |
| [16:44:07] | <paul121[m]> | ooh interesting |
| [16:44:16] | <mstenta[m]> | not sure how it knows that haha |
| [16:44:42] | <MarcosCarballal[> | Should I try something else other than beta1? Can't hurt |
| [16:46:03] | <mstenta[m]> | Well you could try 2.x-dev again... but something else might be up here |
| [16:46:44] | <mstenta[m]> | I should probably try to replicate this on my end, when I have some time to focus (and kids are bugging me for snacks and stuff haha) |
| [16:47:26] | <mstenta[m]> | Worse comes to worse we are ABOUT to tag 2.0.0-beta2, which includes D9.3.2 and removes that patch |
| [16:48:15] | <mstenta[m]> | (maybe this is a good reason to finally document that composer workflow at the same time) |
| [16:48:23] | <paul121[m]> | fwiw I've used `composer create-project farmos/project -s dev` a few times now and it worked, but never realized that was still using `2.x-dev` instead of `2.0.0-beta` for farmOS! |
| [16:48:35] | <paul121[m]> | so I cannot say I've tested the composer workflow with beta :-) |
| [16:49:25] | <mstenta[m]> | Marcos Carballal: can you try starting fresh again in a new directory and running that? just to see if it works... |
| [16:49:47] | <MarcosCarballal[> | Sure! Now creating folder "farmOS4" 😅 |
| [16:49:57] | <mstenta[m]> | dev version has some bug fixes that will be in beta2 anyway |
| [16:50:25] | <mstenta[m]> | haha let's try to get this before "farmOS10" folder 😆 |
| [16:50:53] | <MarcosCarballal[> | - Installing farmos/farmos (2.x-dev 30f7061): Extracting archive |
| [16:50:55] | <mstenta[m]> | wife is taking over with kids in 5 mins so i'll be able to try some things... until dinner at least |
| [16:51:00] | <MarcosCarballal[> | This is the version I am grabbing |
| [16:51:21] | <mstenta[m]> | cool - that's the latest commit |
| [16:51:23] | <MarcosCarballal[> | We can pick this up tomorrow too if needed. Family is more important |
| [16:51:49] | <MarcosCarballal[> | A different patch error |
| [16:51:50] | <MarcosCarballal[> | ACTION uploaded an image: (130KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/JHPPVQDumNh... > |
| [16:51:54] | <MarcosCarballal[> | Not sure if that means we are any closer |
| [16:53:30] | <mstenta[m]> | can you see what version of `drupal/core` is being installed? |
| [16:53:44] | <mstenta[m]> | above that in the output |
| [16:54:46] | <MarcosCarballal[> | 9.3.2 |
| [16:56:49] | <mstenta[m]> | standby... testing this myself... |
| [17:00:11] | <mstenta[m]> | well... it worked :-( |
| [17:01:03] | <mstenta[m]> | hmmmm what could be different about your environment i wonder?? |
| [17:01:12] | <mstenta[m]> | i tested within the farmOS Docker container |
| [17:01:33] | <MarcosCarballal[> | Dangit! |
| [17:01:48] | <mstenta[m]> | (spun up a fresh dev environment, got into the bash shell, deleted everything in /opt/drupal, and ran `composer create-project farmos/project -s dev`) |
| [17:02:32] | <MarcosCarballal[> | Could it be a file-writing permission? |
| [17:02:45] | <MarcosCarballal[> | I'm the root user though, so I doubt it |
| [17:02:49] | <mstenta[m]> | hmm |
| [17:03:06] | <mstenta[m]> | i doubt it... if you made it to patches... that means other files were created/written |
| [17:03:21] | <mstenta[m]> | i wonder if composer is caching something |
| [17:03:26] | <mstenta[m]> | oh what version of composer do you have? |
| [17:03:50] | <mstenta[m]> | `composer -V` |
| [17:04:06] | <MarcosCarballal[> | Composer version 2.2.4 2022-01-08 12:30:42 |
| [17:04:08] | <mstenta[m]> | www-data@b6da8518291b:/opt/drupal$ composer -V |
| [17:04:08] | <mstenta[m]> | Composer version 2.2.3 2021-12-31 12:18:53 |
| [17:04:13] | <mstenta[m]> | ok that's good |
| [17:04:20] | <MarcosCarballal[> | [root@ip-40-20-24-39 farmos4]# php -v |
| [17:04:20] | <MarcosCarballal[> | PHP 7.4.27 (cli) (built: Dec 14 2021 17:17:06) ( NTS ) |
| [17:04:20] | <MarcosCarballal[> | Copyright (c) The PHP Group |
| [17:04:20] | <MarcosCarballal[> | Zend Engine v3.4.0, Copyright (c) Zend Technologies |
| [17:04:22] | <mstenta[m]> | hmm |
| [17:04:50] | <mstenta[m]> | i wonder if something weird is getting cached by composer |
| [17:05:00] | <mstenta[m]> | try `composer clearcache` and then do the `create-project` again |
| [17:05:05] | <mstenta[m]> | (in a fresh dir) |
| [17:05:23] | <MarcosCarballal[> | farmOS5 it is 🙂 5th ones the charm |
| [17:05:31] | <mstenta[m]> | (grasping at straws here a bit) |
| [17:07:05] | <MarcosCarballal[> | ACTION uploaded an image: (82KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/WPlhZOmnHIL... > |
| [17:07:13] | <MarcosCarballal[> | I've been getting these prompts, just saying yes for now |
| [17:07:16] | <mstenta[m]> | oh good!!! |
| [17:07:23] | <mstenta[m]> | "y" to all of those |
| [17:07:35] | <MarcosCarballal[> | Well I had those before too |
| [17:07:39] | <mstenta[m]> | oh ok lol |
| [17:07:49] | <MarcosCarballal[> | Same error. |
| [17:08:00] | <mstenta[m]> | ugh |
| [17:08:20] | <mstenta[m]> | alright well... |
| [17:08:47] | <mstenta[m]> | if you want to just get something up and running, you can download this tarball: https://github.com/farmOS/farmOS/releases/download/2.0.0-beta1/farmOS-2.... |
| [17:08:57] | <mstenta[m]> | that is actually produced via the same process in the Dockerfile |
| [17:09:15] | <mstenta[m]> | and then just packaged up into a tarball for folks who can't use Docker or Composer (eg: on shared hosting) |
| [17:09:25] | <mstenta[m]> | so technically, that would be what you want to end up with anyway |
| [17:09:36] | <mstenta[m]> | that's 2.0.0-beta1 |
| [17:10:53] | <mstenta[m]> | i'd like to get to the bottom of this issue... but i'm scratching my head a bit because i can't reproduce it myself |
| [17:11:18] | <mstenta[m]> | this tarball is one of our officially supported hosting approaches though... |
| [17:11:33] | <mstenta[m]> | https://farmos.org/hosting/install/#packaged-releases |
| [17:11:51] | <MarcosCarballal[> | Okay, I'm going to play around with this a bit more to see if it's any obvious mistake on my part. If it still doesn't shake out I'll try out the tarball |
| [17:12:33] | <mstenta[m]> | question: does it look like other patches are being applied properly? |
| [17:13:14] | <MarcosCarballal[> | It looks like the patch on Drupal is the first one it attempts to apply, fails and exits. |
| [17:13:31] | <mstenta[m]> | or are *no* patches working... (i wonder if you need some other system dependency like the `patch` command itself) |
| [17:13:34] | <mstenta[m]> | ah ok... hmm |
| [17:13:41] | <mstenta[m]> | does the `patch` command exist? |
| [17:14:04] | <MarcosCarballal[> | [root@ip-40-20-24-39 farmos7]# which patch |
| [17:14:04] | <MarcosCarballal[> | /usr/bin/which: no patch in (/sbin:/bin:/usr/sbin:/usr/bin) |
| [17:14:09] | <MarcosCarballal[> | Doesn't seem to be one on path |
| [17:14:30] | <mstenta[m]> | ok... one sec... this is the package that actually handles applying patches: https://github.com/cweagans/composer-patches |
| [17:14:38] | <mstenta[m]> | i'm not sure what it uses internally... maybe not `patch` command... |
| [17:15:21] | <MarcosCarballal[> | `Do you trust "cweagans/composer-patches" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] y` |
| [17:15:34] | <MarcosCarballal[> | This came up during install process.. |
| [17:15:40] | <MarcosCarballal[> | So it seems like it is there |
| [17:15:56] | <MarcosCarballal[> | composer-patches version 1.7.1 |
| [17:16:34] | <mstenta[m]> | oh ok... looks like `cweagans/composer-patches` tries to use `git apply` first, and then falls back to using `patch` |
| [17:16:40] | <mstenta[m]> | i assume you have git |
| [17:16:47] | <mstenta[m]> | lets try installing the patch command |
| [17:17:09] | <MarcosCarballal[> | I have git |
| [17:19:11] | <mstenta[m]> | i can't for the life of me find out how to install the patch command on RHEL haha |
| [17:19:18] | <mstenta[m]> | for some reason that is hard to google for |
| [17:21:01] | <mstenta[m]> | (i'm a bit astonished it's not included) |
| [17:21:50] | <mstenta[m]> | maybe just `sudo yum install patch`? |
| [17:22:46] | <MarcosCarballal[> | That worked. No idea if it is the right "patch" though |
| [17:23:07] | <mstenta[m]> | should be https://serverfault.com/questions/457550/patch-command-not-found |
| [17:23:08] | <MarcosCarballal[> | GNU patch 2.7.1... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/56225dc5d8...) |
| [17:23:16] | <mstenta[m]> | yup that's the one :-) |
| [17:23:27] | <mstenta[m]> | alright let's see if that helps :-) |
| [17:23:32] | <MarcosCarballal[> | Okay, going to start from the beginning again |
| [17:23:51] | <mstenta[m]> | "farmOS6" FTW! 🤞 |
| [17:24:44] | <mstenta[m]> | this is all good information to include in our future "composer workflow" docs... |
| [17:24:57] | <MarcosCarballal[> | ACTION uploaded an image: (593KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/ESyDROwBiFS... > |
| [17:24:58] | <MarcosCarballal[> | !!!! |
| [17:24:59] | <MarcosCarballal[> | Looks like it did it |
| [17:25:02] | <mstenta[m]> | YAY! |
| [17:25:12] | <mstenta[m]> | wow whoda thunk `patch` would be missing lol |
| [17:25:34] | <MarcosCarballal[> | I've just started using RHEL and I already have many gripes.. |
| [17:25:54] | <mstenta[m]> | Yea I'm a big fan of Debian (and Ubuntu) |
| [17:26:08] | <mstenta[m]> | But I get that USDA probably wants to use something with "Enterprise" in the name ;-) |
| [17:26:39] | <MarcosCarballal[> | Yup! Okay so I think we are doing okay here. Our new project is basically just a composer.json file at this point, correct? |
| [17:26:50] | <MarcosCarballal[> | The rest is implied from the composer.json |
| [17:27:05] | <mstenta[m]> | Right so you will want to at least commit `composer.json` and `composer.lock` |
| [17:27:31] | <mstenta[m]> | `composer.json` has general rules for the packages and versions you want... `composer.lock` has the ACTUAL explicit versions that were installed |
| [17:27:47] | <mstenta[m]> | so you can have a reproducible build by sharing those two and running `composer.install` (in theory) |
| [17:28:30] | <MarcosCarballal[> | Yeah definitely! So what would I need to add to this to actually get farmOS showing up in the browser? |
| [17:28:36] | <mstenta[m]> | like i said before... you *could* commit EVERYTHING if you want... including `vendor` and `web`... if you want to be able to simply deploy via Git and avoid running `composer` commands on production... which is risky IMO |
| [17:29:02] | <mstenta[m]> | ah yea.. so... what you have now is the codebase. you'll notice there is a `web` directory in it |
| [17:29:08] | <mstenta[m]> | that's your webroot |
| [17:29:21] | <mstenta[m]> | so configure Apache to serve that - there's an `index.php` in it |
| [17:29:45] | <mstenta[m]> | (notice how `vendor` is kept outside of the webroot for security) |
| [17:30:12] | <mstenta[m]> | the farmOS code itself is in `web/profiles/farm` |
| [17:30:28] | <mstenta[m]> | one thing you may end up doing is building custom modules |
| [17:30:43] | <mstenta[m]> | I would recommend putting those in `web/sites/all/modules` and committing that to the repo as well |
| [17:31:06] | <MarcosCarballal[> | Ah okay great! I think I should be able to get apache serving it. Might not see results today as I still need to get it exposed outside of the VPC (Virtual private cloud). |
| [17:31:09] | <mstenta[m]> | here's an example of another repo that is set up similarly: https://github.com/mstenta/farm_nfa |
| [17:32:25] | <mstenta[m]> | (that one puts modules in `web/modules` which is also fine... that's where composer will automatically install modules that you get via `composer require drupal/[modulename]` |
| [17:33:53] | <mstenta[m]> | glad we got that composer install worked out :-) |
| [17:34:23] | <MarcosCarballal[> | Definitely! Thanks so so much for your help. |
| [17:34:40] | <MarcosCarballal[> | That Github is a nice little cheat sheet for development 🙂 |
| [17:34:46] | <mstenta[m]> | yea! |
| [17:35:09] | <mstenta[m]> | that's a farmOS deployment for the forest service |
| [17:36:06] | <mstenta[m]> | in that example, they manage Drupal configuration by saving it to the `config/sync` directory |
| [17:36:54] | <mstenta[m]> | https://www.drupal.org/docs/configuration-management/managing-your-sites... |
| [17:38:13] | <mstenta[m]> | when you and i were looking at stuff together via screenshare, i think i showed you how to export individual config YML files... it's also possible to just export ALL config and drop it into a directory, which can be checked into source control to make it easier for sharing across developers and staging deployments |
| [17:38:18] | <mstenta[m]> | so that might be helpful as you're creating taxonomies, fields, etc |
| [17:38:26] | <mstenta[m]> | asset types too |
| [17:38:30] | <mstenta[m]> | all of that is "config" |
| [17:39:10] | <MarcosCarballal[> | Yeah exactly. Our Drupal Developer (Peter Mariana) suggested using "drush cex" and "drush cim" |
| [17:39:27] | <mstenta[m]> | oh nice yea! so you've got someone who knows how it works :-) |
| [17:40:11] | <MarcosCarballal[> | If it was just me we would be screwed 😂 |
| [17:40:28] | <mstenta[m]> | haha |
| [17:41:15] | <mstenta[m]> | the nice thing about all this is: you can quickly build out all the config you need for the project, and then later, if it would make sense to "share" some things across multiple farmOS instances (either in USDA or with the public), some of that config can be packaged into modules to distribute |
| [17:41:58] | <mstenta[m]> | but you don't have to figure any of that out upfront... it's an easy "next step" |
| [17:44:19] | <mstenta[m]> | well - time for dinner here! good luck Marcos Carballal ! feel free to ping/post questions here as they come up |
| [17:44:24] | <mstenta[m]> | have a nice evening! |
| [17:44:33] | <MarcosCarballal[> | You too! Thanks again Mike you rock! |