| [19:00:53] | <shane_aldrich[m]> | This is the 4th time I've done a clean install this afternoon |
| [19:02:37] | <mstenta[m]> | shane_aldrich: that's really weird - i've never seen that either |
| [19:03:01] | <mstenta[m]> | my first thought was: maybe PHP doesn't have the postgresql drivers installed or something... |
| [19:03:10] | <mstenta[m]> | but if you're using the docker container then that wouldn't be an issue |
| [19:03:11] | <mstenta[m]> | so i'm stumped |
| [19:03:32] | <mstenta[m]> | but it definitely seems like there's some other permissions issues occurring, so maybe they're related |
| [19:04:17] | <mstenta[m]> | i really have no experience with modern windows or wsl2, so i can't say if there is an incompatibility issue - hopefully our image doesn't have some built in limitation |
| [19:05:24] | <shane_aldrich[m]> | So wsl2 is running Ubuntu 20.04. It's the same as 2 weeks ago. The only thing that's changed now is the new `docker-compose` installation. |
| [19:05:42] | <mstenta[m]> | oh and it was working 2 weeks ago? |
| [19:06:12] | <mstenta[m]> | you just updated docker composer? |
| [19:06:22] | <shane_aldrich[m]> | Here are the `db` directory permissions: `drwx------ systemd-coredump root` |
| [19:06:29] | <shane_aldrich[m]> | mstenta[m]: yes |
| [19:06:30] | <mstenta[m]> | sorry i think i missed some of that |
| [19:06:42] | <shane_aldrich[m]> | mstenta[m]: yes |
| [19:06:52] | <mstenta[m]> | `docker-compose --version` |
| [19:06:55] | <mstenta[m]> | what version now? |
| [19:07:18] | <mstenta[m]> | mine:... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/64c76320b4...) |
| [19:08:05] | <shane_aldrich[m]> | version `2.1.1` |
| [19:08:38] | <shane_aldrich[m]> | This is set through Windows Docker Desktop with wsl2 integration. |
| [19:10:37] | <mstenta[m]> | finishing the dishes... brb :-) |
| [19:10:40] | <shane_aldrich[m]> | Shit! I think I just found something... The `db` is running on port `5432` not `3306` |
| [19:10:55] | <mstenta[m]> | postgresql runs on 5432 |
| [19:10:55] | <mstenta[m]> | that's correct |
| [19:12:00] | <shane_aldrich[m]> | OK. Just tried to change that via advanced through the UI. No dice. Wash those dishes. 😜 |
| [19:33:33] | <shane_aldrich[m]> | Last screenshot to confuse all of us further 🤣: |
| [19:33:40] | <shane_aldrich[m]> | ACTION uploaded an image: (108KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/AUqjwQBHMzQ... > |
| [19:34:36] | <mstenta[m]> | Haha maybe it's time to buy a raspberry pi shane_aldrich 😅 |
| [19:34:46] | <mstenta[m]> | Make it your farmOS server :-P |
| [19:36:03] | <shane_aldrich[m]> | I was already looking into getting one of those to set up a Kodi box at home. Need to get some income first. |
| [19:36:22] | <mstenta[m]> | Oh neat. Always wanted to try Kodi |
| [19:37:21] | <mstenta[m]> | I wonder: would it be worth trying to run VirtualBox with Debian/Ubuntu? Just to see if the WSL stuff is affecting this |
| [19:37:28] | <shane_aldrich[m]> | I'm going to start over one more time for today. If that doesn't work, I'll get back at it tomorrow. BTW... I'm following the instructions from this link: https://docs.farmos.org/development/environment/ |
| [19:38:28] | <mstenta[m]> | Our automated tests basically just run the dev docker compose, so we know that it works in a clean/raw Debian environment. I'm just not sure what variables to look out for outside of that unfortunately |
| [19:38:46] | <shane_aldrich[m]> | VirtualBox is a complete resource hog. WSL has been just fine after I figured out some of the initial quirks. It's basically CLI Ubuntu no GUI. |
| [19:39:21] | <mstenta[m]> | Yea agreed. I just don't know if there are special considerations with things like permissions etc that might affect this |
| [19:39:24] | <mstenta[m]> | Just no experience |
| [19:39:54] | <shane_aldrich[m]> | All permissions are handled the same way as if I was in a completely Linux environment. |
| [19:41:11] | <mstenta[m]> | I'd be curious to look at the drupal core code for the installer form where you select db type. The fact that you CANT select postgres is very weird and there must be a concrete reason for it |
| [19:41:42] | <mstenta[m]> | There must be drupal logic that is detecting something with your system and disabling the option |
| [19:41:46] | <mstenta[m]> | I don't know |
| [19:41:56] | <shane_aldrich[m]> | `docker-compose` is pulling right now. |
| [19:43:36] | <shane_aldrich[m]> | And I think I might know what happened. Stay tuned. |
| [19:49:07] | <shane_aldrich[m]> | A couple of things before I reveal what I think happened. While going through the UI install process, it does not create the proper files and permissions while installing this way. So I have to do the following to move on to the `db` part. |
| [19:49:08] | <shane_aldrich[m]> | 1. `sudo chmod -R 777 default` |
| [19:49:08] | <shane_aldrich[m]> | 2. `cp default.settings.php settings.php` |
| [19:49:08] | <shane_aldrich[m]> | 3. `sudo chmod 777 settings.php` |
| [19:49:39] | <shane_aldrich[m]> | After that, here is what I see: |
| [19:49:44] | <shane_aldrich[m]> | ACTION uploaded an image: (61KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/VQlhoeeUVYB... > |
| [19:50:00] | <shane_aldrich[m]> | So Database type is still not selectable |
| [19:50:41] | <shane_aldrich[m]> | I'm not worried about `777` permissions since I'm running this locally. |
| [19:51:58] | <shane_aldrich[m]> | Do you want to see anything from the developer console? |
| [19:51:59] | <mstenta[m]> | I have never experienced this |
| [19:52:21] | <mstenta[m]> | Postgresql and SQLite are always database type options |
| [19:52:53] | <mstenta[m]> | There must be a concrete reason they aren't showing up in your install form |
| [19:53:13] | <mstenta[m]> | It would probably require digging into that form logic to see why exactly |
| [19:53:40] | <shane_aldrich[m]> | How would I find that for you? |
| [19:54:02] | <mstenta[m]> | If I was near my computer I would grep for "percona server, or equivalent" |
| [19:54:33] | <mstenta[m]> | In the "core" directory |
| [19:54:44] | <mstenta[m]> | Of drupal core (not farmOS) |
| [19:54:50] | <shane_aldrich[m]> | I will look there now |
| [19:55:08] | <mstenta[m]> | That would probably bring you to the file that defines that form |
| [19:55:24] | <mstenta[m]> | Then I would look for logic around that field that might be limiting the options |
| [19:56:17] | <shane_aldrich[m]> | I'm not really familiar with `grep` commands |
| [19:56:43] | <mstenta[m]> | Basically string search |
| [19:56:51] | <mstenta[m]> | Super useful! |
| [19:57:12] | <shane_aldrich[m]> | I'm in the `web/core` directory now |
| [19:57:12] | <mstenta[m]> | grep -irn "percona" corr |
| [19:57:21] | <mstenta[m]> | s/corr/./ |
| [19:58:00] | <mstenta[m]> | Will show everywhere in The current directory where "percona" exists |
| [19:58:29] | <mstenta[m]> | (I'm just using that a an example string that might be narrow enough to get you to this install form) |
| [19:58:41] | <shane_aldrich[m]> | ACTION uploaded an image: (202KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/fkKqOnBqbXE... > |
| [19:58:45] | <mstenta[m]> | (feel free to try other strings that might be even more specific) |
| [19:59:02] | <mstenta[m]> | Cool |
| [19:59:18] | <mstenta[m]> | Avoid anything with "test" in the file name :-) |
| [19:59:34] | <mstenta[m]> | Those are probably automated tests |
| [20:00:03] | <mstenta[m]> | This might not be the best string to search |
| [20:00:18] | <mstenta[m]> | Try another string in that page outside of the db field options |
| [20:00:33] | <shane_aldrich[m]> | So from what I see, I should look at the `Install/Tasks.php` file |
| [20:01:03] | <mstenta[m]> | That was my first thought too, but those are MySQL specific |
| [20:01:17] | <mstenta[m]> | The overall form will be more generic |
| [20:01:23] | <mstenta[m]> | It probably loads that file |
| [20:01:41] | <shane_aldrich[m]> | Should I `grep` for `postgresql`? |
| [20:01:43] | <mstenta[m]> | Notice the driver/MySQL part of the file path |
| [20:02:07] | <mstenta[m]> | That would return many many results |
| [20:02:23] | <mstenta[m]> | Share a full screenshot of the install page? |
| [20:02:43] | <mstenta[m]> | I just forget what strings are on it that might be narrow enough to grep |
| [20:03:18] | <shane_aldrich[m]> | ACTION uploaded an image: (3338KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/NXRHzWxZqPN... > |
| [20:03:51] | <mstenta[m]> | Ah dang not really much to go on |
| [20:04:56] | <shane_aldrich[m]> | It seems that I should be able to find the proper information from the `install.php` file based on the URL |
| [20:05:19] | <mstenta[m]> | i found it... |
| [20:05:30] | <shane_aldrich[m]> | Woo hoo! |
| [20:06:29] | <mstenta[m]> | https://git.drupalcode.org/project/drupal/-/blob/9.3.x/core/lib/Drupal/C... |
| [20:07:18] | <shane_aldrich[m]> | Looking at that now |
| [20:07:48] | <mstenta[m]> | did you create a `settings.php` file? |
| [20:08:08] | <mstenta[m]> | if so, delete it, and make sure you have `0777` perms on the `sites/default` directory, then reload that page |
| [20:09:02] | <shane_aldrich[m]> | I did. I'll do a `chmod -R` for the directory now after deleting `settings.php` |
| [20:09:33] | <mstenta[m]> | this install form will create `settings.php` for you, as long as it can write to the dir |
| [20:09:43] | <mstenta[m]> | so you don't need to |
| [20:09:50] | <mstenta[m]> | maybe that's messing this up |
| [20:11:11] | <shane_aldrich[m]> | So this is kind of what I've been doing after `docker-compose up -d`. I `chmod -R 777 default` and run the installer again. Trying again now. |
| [20:12:00] | <mstenta[m]> | if you want to start completely fresh, run `docker-compose down`, then delete EVERYTHING except the `docker-compose.yml` file before running `docker-compose up -d` |
| [20:12:09] | <mstenta[m]> | including `www` and `db` dirs |
| [20:12:10] | <shane_aldrich[m]> | `Settings file does not exist` |
| [20:12:35] | <mstenta[m]> | if permissions are writeable then drupal will be able to create settings file |
| [20:12:54] | <mstenta[m]> | so something's up with permissions (it seems) |
| [20:13:29] | <shane_aldrich[m]> | Totally! `777` should be working |
| [20:13:33] | <mstenta[m]> | yea |
| [20:13:39] | <mstenta[m]> | have you been deleting `www` and `db` dirs? |
| [20:13:52] | <mstenta[m]> | i would suggest doing that to ensure you're starting 100% from scratch |
| [20:14:02] | <shane_aldrich[m]> | `sudo rm -rf *` in my directory |
| [20:14:19] | <mstenta[m]> | eek don't delete the `docker-compose.yml` tho! :-) |
| [20:14:31] | <mstenta[m]> | (not hard to recreate) |
| [20:14:37] | <shane_aldrich[m]> | That's easy to get with `curl` |
| [20:15:35] | <mstenta[m]> | so... i'm curious if this has to do with the uid 1000 assumption that the docker dev image has |
| [20:15:43] | <mstenta[m]> | maybe that doesn't jive with wsl |
| [20:15:53] | <mstenta[m]> | run `id -u` |
| [20:16:00] | <mstenta[m]> | do you get `1000`? |
| [20:16:32] | <shane_aldrich[m]> | No containers running. No images left over. No files or directories remain. `curl` then `docker-compose up -d` |
| [20:16:49] | <mstenta[m]> | (but 777 perms should brute force any perms issues, so i don't know...) |
| [20:16:51] | <shane_aldrich[m]> | I usually get `shane:shane` for user and group |
| [20:17:01] | <mstenta[m]> | ok but what's the numerical user id of `shane`? |
| [20:17:06] | <mstenta[m]> | `id -u` will tell you |
| [20:17:21] | <mstenta[m]> | default ubuntu user id is `1000` |
| [20:17:33] | <mstenta[m]> | (for the main login user) |
| [20:17:42] | <mstenta[m]> | maybe that's different on wsl |
| [20:17:45] | <shane_aldrich[m]> | pulling now. let me check `id -u` |
| [20:18:00] | <shane_aldrich[m]> | `1000` |
| [20:18:13] | <mstenta[m]> | ok 👍️ |
| [20:18:15] | <mstenta[m]> | so that should work |
| [20:18:36] | <mstenta[m]> | if this fresh install doesn't work i'm stumped shane_aldrich |
| [20:18:51] | <mstenta[m]> | my next advice would be to try a different environment |
| [20:19:25] | <paul121[m]> | Be careful about deleting everything if your module is in sites/all/modules!!!! |
| [20:19:32] | <shane_aldrich[m]> | While this is pulling... The user/group after install is `systemd-coredump root` for the `db` directory |
| [20:19:41] | <mstenta[m]> | oh yea... good point paul121 |
| [20:20:07] | <shane_aldrich[m]> | paul121[m]: No worries there. I have a directory in my home directory where those stay while I do these things. |
| [20:20:33] | <mstenta[m]> | your confidence in running `rm -rf` suggested you knew what you were doing shane_aldrich haha |
| [20:21:02] | <shane_aldrich[m]> | Pulling is complete. I will set `default` to `777` before installing through the UI |
| [20:21:21] | <mstenta[m]> | (with `-R`) |
| [20:22:00] | <mstenta[m]> | (i still want to know why you would even need to do 777 in the first place... but one thing at a time...) |
| [20:22:29] | <shane_aldrich[m]> | ACTION uploaded an image: (8KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/vmWsBMRMslE... > |
| [20:22:49] | <shane_aldrich[m]> | mstenta[m]: It's been that way for a while with Docker |
| [20:23:00] | <mstenta[m]> | that' |
| [20:23:18] | <mstenta[m]> | * that's why i'm suspecting wsl or docker for windows etc... |
| [20:23:25] | <mstenta[m]> | those are the only pieces here that are unfamiliar to me |
| [20:23:40] | <mstenta[m]> | but i don't have anything specific to go on... |
| [20:23:56] | <mstenta[m]> | you're doing everything right, it seems |
| [20:24:03] | <shane_aldrich[m]> | ACTION uploaded an image: (68KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/uABNhpEuPjS... > |
| [20:24:39] | <mstenta[m]> | would it be worth trying to install via drush?? |
| [20:24:57] | <mstenta[m]> | (did paul121 suggest this at one point? i seem to remember skimming a previous convo) |
| [20:25:42] | <mstenta[m]> | `docker-compose exec -u www-data www vendor/bin/drush site-install -y --db-url=pgsql://farm:farm@db/farm --account-pass=admin` (i think) |
| [20:25:58] | <shane_aldrich[m]> | That was how I was doing it before. Then I decided to try Docker again to make the process a bit smoother. `drush` always seemed to work out just fine except for knowing where to grab the most recent alpha from |
| [20:26:45] | <mstenta[m]> | run that command from the directory that `docker-compose.yml` is in |
| [20:27:10] | <mstenta[m]> | i honestly never install farmOS through the UI myself anymore... i only use this |
| [20:27:53] | <mstenta[m]> | (i think you do actually need to copy settings.php manually via that method, now that i recall... drush does that for you) |
| [20:27:56] | <shane_aldrich[m]> | I just checked my notes. I was using `composer` to do the installs before, not `drush` |
| [20:28:32] | <mstenta[m]> | `composer install` is just for building the codebase - `drush site-install` installs drupal (creates the database, setting.php files, etc) |
| [20:29:13] | <shane_aldrich[m]> | File permissions could not be set that way |
| [20:29:31] | <mstenta[m]> | (`composer install` is run during the image build process, so that's already done - the codebase is pre-built for you in the docker image) |
| [20:29:41] | <mstenta[m]> | (but you need to install drupal) |
| [20:29:58] | <mstenta[m]> | shane_aldrich[m]: did you get an error? |
| [20:30:02] | <mstenta[m]> | paste? |
| [20:30:18] | <shane_aldrich[m]> | mstenta[m]: Yes. I cut and pasted. |
| [20:31:07] | <shane_aldrich[m]> | Let me add `sudo` to the front of that command |
| [20:31:08] | <mstenta[m]> | <mstenta[m]> "so something's up with permissio..." <- :-) |
| [20:31:20] | <mstenta[m]> | but WHAT... is the question |
| [20:32:33] | <shane_aldrich[m]> | ACTION uploaded an image: (26KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/qFKcYBHuKtk... > |
| [20:33:09] | <mstenta[m]> | ok let's try something... |
| [20:33:16] | <shane_aldrich[m]> | That was from both methods. One without `sudo` and one with. |
| [20:33:23] | <mstenta[m]> | `sudo chown -R www-data:www-data default` |
| [20:33:29] | <mstenta[m]> | (on the `sites/default` dir) |
| [20:34:34] | <shane_aldrich[m]> | changed. go back to drush or UI? |
| [20:34:42] | <mstenta[m]> | try drush again |
| [20:36:17] | <shane_aldrich[m]> | ACTION uploaded an image: (68KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/VzSaSsWcpAe... > |
| [20:36:51] | <mstenta[m]> | i'm out of ideas shane_aldrich sorry |
| [20:37:49] | <shane_aldrich[m]> | I understand. You need to get some rest. I'll come back at this tomorrow to see if I can figure it all out. I might have to see how `nginx` is handling user/group stuff |
| [20:38:08] | <mstenta[m]> | https://stackoverflow.com/questions/65582382/wsl2-docker-linux-permissio... |
| [20:38:11] | <mstenta[m]> | maybe this? |
| [20:38:29] | <mstenta[m]> | https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-... |
| [20:39:15] | <mstenta[m]> | (shot in the dark) |
| [20:39:49] | <shane_aldrich[m]> | Thanks for the links. I'm serious... Get some rest brother! I will be back at it tomorrow morning before my lunch meeting. 🍻👋 |
| [20:39:53] | <mstenta[m]> | i would do some googling (or duckduckgoing) about that in particular- "wsl2 docker permissions issues" has a lot of results... |
| [11:40:10] | <paul121[m]> | hey everyone! I did a thing! started a little web app for spinning up demos of farmOS 2.x |
| [11:40:10] | <paul121[m]> | https://laughing-mclean-bcdbff.netlify.app/ |
| [11:40:10] | <paul121[m]> | https://github.com/paul121/farm-tugboat-demo |
| [11:40:55] | <paul121[m]> | it's really quite simple (and not very pretty) - all the smarts comes a free plan on https://www.tugboat.qa/ |
| [11:41:06] | <paul121[m]> | * smarts comes from a free |
| [11:42:53] | <paul121[m]> | feel free to test it out! just know the demo previews are deleted after 24 hours |
| [11:43:56] | <paul121[m]> | would appreciate some soft stress testing to see how this concept works (using Netlify serverless functions on the "backend") |
| [11:44:34] | <paul121[m]> | if you wait until the demo is ready a login link will be generated |
| [11:44:51] | <paul121[m]> | but the logins are `admin/admin` or `manager/manager` |
| [12:01:57] | <mstenta[m]> | 🙌 |
| [12:02:01] | <mstenta[m]> | This is super exciting! |
| [12:03:31] | <mstenta[m]> | I can imagine linking to this from farmOS.org for a live demo |
| [12:03:56] | <mstenta[m]> | With a module that populates some default content... 🤩 |
| [12:21:05] | <paul121[m]> | definitely! would love to get this setup with some default content. Pre-populated locations in the map at the very least |
| [14:20:05] | <shane_aldrich[m]> | Looks like I made some progress. This is what I get now after running `docker-compose exec -u www-data www vendor/bin/drush site-install -y --db-url=pgsql://farm@db/farm --account-pass=admin` |
| [14:20:22] | <shane_aldrich[m]> | ACTION uploaded an image: (145KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/zPeZEnDnlPS... > |
| [14:20:57] | <shane_aldrich[m]> | Each time it asks for the user `farm` password, I type "farm" |
| [14:21:34] | <shane_aldrich[m]> | * type "farm". Should I be using "admin" instead? |
| [14:22:12] | <mstenta[m]> | OK that's progress! :-D |
| [14:22:17] | <mstenta[m]> | I think haha |
| [14:22:39] | <shane_aldrich[m]> | At least the last notice didn't fail |
| [14:23:08] | <mstenta[m]> | So the `--db-url=pgsql://farm@db/farm` argument is what's telling Drush where the database is and what the credentials are |
| [14:23:42] | <mstenta[m]> | The database host URL is actually just `db` in this case... because that's the name of the database service defined in the `docker-compose.yml` file... and Docker creates a network between all of the hosts in there, and makes them all accessible to one another by simple names like that |
| [14:23:55] | <mstenta[m]> | So it seems that maybe something is not working there... |
| [14:24:44] | <mstenta[m]> | oh wait... |
| [14:24:46] | <mstenta[m]> | that argument is wrong |
| [14:24:51] | <shane_aldrich[m]> | Here is a screenshot of the lines just above that |
| [14:24:53] | <mstenta[m]> | it should be `--db-url=pgsql://farm:farm@db/farm` |
| [14:24:54] | <shane_aldrich[m]> | ACTION uploaded an image: (55KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/ewcOWUDzptu... > |
| [14:25:01] | <mstenta[m]> | notice the extra `:farm`... that's the password |
| [14:25:17] | <shane_aldrich[m]> | OK. Let me make that change |
| [14:27:36] | <shane_aldrich[m]> | Getting closer. Getting a warning that says `is_dir()` for private in `settings.php`. But looks like it completed. |
| [14:27:54] | <mstenta[m]> | that's normal (sort of) |
| [14:27:58] | <mstenta[m]> | harmless |
| [14:28:08] | <mstenta[m]> | you can configure private filesystem after install |
| [14:28:20] | <mstenta[m]> | i think we have docs for that... lemme see |
| [14:28:40] | <shane_aldrich[m]> | Well... I went to the homepage and got this `The website encountered an unexpected error. Please try again later.` |
| [14:28:48] | <mstenta[m]> | https://docs.farmos.org/development/environment/#configure-private-files... |
| [14:29:09] | <mstenta[m]> | ok so you need to see apache logs to debug that |
| [14:29:13] | <mstenta[m]> | stop your containers |
| [14:29:21] | <mstenta[m]> | and run `docker-compose up` (without the -d) |
| [14:29:25] | <mstenta[m]> | and revisit the page |
| [14:29:37] | <mstenta[m]> | that will run the containers in the foreground and output logs to the terminal |
| [14:29:57] | <mstenta[m]> | (fwiw that's usually how i run it, and just leave the terminal window open, so i know it's running... for dev env anyway) |
| [14:31:48] | <shane_aldrich[m]> | So this is installing Apache as well? If so, that might be the problem for me since I have `nginx` running right now. In developer tools I see a `500` error |
| [14:32:10] | <mstenta[m]> | the `www` container is running apache |
| [14:32:44] | <shane_aldrich[m]> | ACTION uploaded an image: (226KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/idrKiaJKGZO... > |
| [14:32:57] | <mstenta[m]> | the farmOS docker container is essentially the apache+php container + the drupal layer + the farmOS layer |
| [14:33:09] | <mstenta[m]> | great! |
| [14:33:14] | <mstenta[m]> | that's what you want to see |
| [14:33:23] | <mstenta[m]> | now try visiting the site in your browser |
| [14:33:27] | <shane_aldrich[m]> | OK. But I still get the error on the homepage |
| [14:33:33] | <mstenta[m]> | you should see the logs roll in, including the error |
| [14:34:07] | <mstenta[m]> | > I have `nginx` running right now. |
| [14:34:07] | <mstenta[m]> | what do you mean? |
| [14:34:12] | <mstenta[m]> | you have nginx running on your laptop? |
| [14:34:39] | <shane_aldrich[m]> | That is running under wsl2. I'm going to stop the service and see what happens |
| [14:35:02] | <mstenta[m]> | oh - could the error you're seeing actually be served from nginx, and not farmOS? |
| [14:35:32] | <mstenta[m]> | if nginx is binding to port 80 on your laptop, then you probably wouldn't be able to start the farmOS container at all, because it would also try to use port 80 and you'd see a conflict error |
| [14:35:48] | <mstenta[m]> | only one service can use a port at a time |
| [14:36:06] | <mstenta[m]> | oh but `The website encountered an unexpected error. Please try again later.` is a Drupal error... so I think that's farmOS, not nginx, now that i think about it |
| [14:36:08] | <shane_aldrich[m]> | `nginx` stopped. "Access Denied" on the site now |
| [14:36:16] | <mstenta[m]> | oh! whaa?? |
| [14:36:25] | <mstenta[m]> | it's working without an error? |
| [14:36:40] | <mstenta[m]> | because you turned off nginx? that doesn't make any sense haha - but OK! |
| [14:36:40] | <shane_aldrich[m]> | ACTION uploaded an image: (63KiB) < https://libera.ems.host/_matrix/media/r0/download/matrix.org/FkPTUudakmM... > |
| [14:36:56] | <mstenta[m]> | great! username/password: admin/admin |
| [14:37:20] | <shane_aldrich[m]> | done! phew! |
| [14:37:51] | <shane_aldrich[m]> | Now let's see what happens when I copy over my module... |
| [14:38:31] | <mstenta[m]> | woo hoo! |
| [14:39:00] | <mstenta[m]> | just for giggles, run the `drush site-install` command again like you did before... |
| [14:39:15] | <mstenta[m]> | what that will do is wipe your current database and re-install farmOS from scratch |
| [14:39:22] | <mstenta[m]> | which is a nice way to "start fresh" from time to time |
| [14:39:29] | <mstenta[m]> | it won't delete any files/modules/code |
| [14:39:31] | <mstenta[m]> | just the database |
| [14:39:44] | <shane_aldrich[m]> | Doing that now |
| [14:39:51] | <mstenta[m]> | save that site-install command (maybe as a bash alias) so you can use it in the future |
| [14:40:11] | <mstenta[m]> | or a little bash script in the same directory as your `docker-compose.yml` file perhaps, if that's helpful |
| [14:40:31] | <mstenta[m]> | (it will only work running from that directory anyway) |
| [14:40:53] | <shane_aldrich[m]> | I have `drush` as an alias `fdrush`. Just need to remember to use `site-install` |
| [14:41:30] | <mstenta[m]> | oh yea |
| [14:41:46] | <mstenta[m]> | i also have an alias `fdrush-si` for this exact thing |
| [14:41:47] | <mstenta[m]> | so i can easily reinstall from scratch with a single command |
| [14:41:58] | <shane_aldrich[m]> | that seemed to work so far. installing my module now |
| [14:42:08] | <mstenta[m]> | great! |
| [14:42:25] | <mstenta[m]> | hey out of curiosity... how did you fix the permission issues from last night? |
| [14:42:34] | <mstenta[m]> | did you have to change any wsl2 config? |
| [14:44:15] | <mstenta[m]> | if so i'd love to get that documented in docs.farmos.org for others |
| [14:46:05] | <shane_aldrich[m]> | I edited two files: `~/.docker/config.json` from `{"credsStore":"desktop.exe"}` to `{"_credsStore":"desktop.exe"}` |
| [14:47:48] | <shane_aldrich[m]> | And`/etc/wsl.conf`. I can copy that here for you to add. |
| [14:48:11] | <shane_aldrich[m]> | `# Enable extra metadata options by default... (full message at https://libera.ems.host/_matrix/media/r0/download/libera.chat/2587936a5f...) |
| [14:48:12] | <mstenta[m]> | thanks! |
| [14:48:39] | <mstenta[m]> | do you remember what you changed in that? |
| [14:49:15] | <mstenta[m]> | was this correct? https://stackoverflow.com/questions/65582382/wsl2-docker-linux-permissio... |
| [14:49:23] | <shane_aldrich[m]> | That file was the same except for `root`. It was `root = /windir/` |
| [14:49:51] | <mstenta[m]> | ah ok - maybe that was it |
| [14:50:05] | <mstenta[m]> | that's what this says too: https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-... |
| [14:50:16] | <shane_aldrich[m]> | That was the first change I made. But it didn't work until I changed the docker `json` file |
| [14:50:23] | <mstenta[m]> | oh ok |
| [14:50:28] | <mstenta[m]> | huh |
| [14:51:04] | <shane_aldrich[m]> | So maybe both needed to happen. Two small changes for people is better than one that might not work. |
| [14:51:38] | <mstenta[m]> | where did you learn to change `docker.json`, do you recall? |
| [14:52:01] | <shane_aldrich[m]> | let me find that link again |
| [14:52:05] | <mstenta[m]> | i might start a forum topic to document this for now... |
| [14:52:26] | <shane_aldrich[m]> | https://github.com/docker/for-win/issues/12355 |
| [14:53:45] | <mstenta[m]> | thanks! |
| [14:54:43] | <shane_aldrich[m]> | You're welcome! I don't mind going through this to help others out. Now I'm adding other modules to get back to being able to try and get some quick forms going. |
| [14:55:50] | <paul121[m]> | <shane_aldrich[m]> "OK. But I still get the error on..." <- fwiw if I install using `drush si ....` and try and load the page while it is installing I will get the same "The website encountered an error....". Clearing the cache post-install fixes it. It sounds like this may have been the prob, but restarting the containers fixed anyways |
| [14:56:32] | <mstenta[m]> | ahhh yea that could be it |
| [14:56:36] | <shane_aldrich[m]> | `drush cr` |
| [14:56:42] | <paul121[m]> | but glad you're up and running ! :-) |
| [14:56:53] | <shane_aldrich[m]> | 🎉🍻 |
| [14:59:43] | <mstenta[m]> | https://farmos.discourse.group/t/developing-in-windows-with-docker-and-w... |
| [16:33:14] | <shane_aldrich[m]> | I'm finally back in phpStorm and trying to get the settings right for the new directory structure using Docker. PHP codesniffer keeps giving me the `phpcs: ERROR: Referenced sniff "Drupal" does not exist`. Also, I just created my "dummy" fungi quick form based on the egg example and I get `Undefined class 'QuickFormBase'` |
| [16:33:45] | <mstenta[m]> | add this to your module's dependencies: `farm_quick` |
| [16:33:50] | <mstenta[m]> | so that it gets installed when your module does |
| [16:34:06] | <mstenta[m]> | (and then reinstall your module) |
| [16:34:34] | <mstenta[m]> | as for the sniff issue... hmm, tbh i'm experiencing that myself right now haha |
| [16:34:43] | <mstenta[m]> | but i think i broke mine |
| [16:37:13] | <shane_aldrich[m]> | adding `farm_quick` did not get rid of the error in phpStorm |
| [16:37:54] | <mstenta[m]> | does `web/profiles/farm/modules/core/quick` exist? |
| [16:38:07] | <mstenta[m]> | you have to install that module |
| [16:38:34] | <mstenta[m]> | `drush en farm_quick` will install it |
| [16:38:58] | <mstenta[m]> | but if PHPStorm is complaining, then maybe that module doesn't exist... which might indicate that you don't have a recent farmOS version |
| [16:39:09] | <mstenta[m]> | are you using the `farmos/farmos:2.x` image? |
| [16:39:18] | <shane_aldrich[m]> | It's in that directory |
| [16:39:22] | <mstenta[m]> | oh ok |
| [16:39:31] | <shane_aldrich[m]> | This is all Docker install from today. |
| [16:40:26] | <mstenta[m]> | just want to make sure... because if you haven't run `docker pull farmos/farmos:2.x` lately, you'll still have an old image |
| [16:40:30] | <shane_aldrich[m]> | When I go to "Extend" farmOS quick forms is enabled |
| [16:40:37] | <mstenta[m]> | ok cool |
| [16:40:43] | <mstenta[m]> | not sure why phpstorm is complaining then |
| [16:40:54] | <mstenta[m]> | maybe it needs to reindex its code to see the new file |
| [16:41:15] | <mstenta[m]> | if you right click on the top level directory in phpstorm, and click "reload from disk" it might help |
| [16:41:19] | <shane_aldrich[m]> | I have all of the directories properly configured. It's reindexed several times now. |
| [16:42:20] | <shane_aldrich[m]> | "reload from disk" didn't work. |
| [16:42:23] | <mstenta[m]> | regardless of phpstorm, does your form work? |
| [16:43:03] | <mstenta[m]> | (maybe i misunderstood - sounded like you were saying that error was in phpstorm, but maybe you meant it's in the browser?) |
| [16:43:08] | <shane_aldrich[m]> | when I click on quick forms from the left I get `The website encountered an unexpected error. Please try again later.` |
| [16:43:24] | <mstenta[m]> | ok |
| [16:43:33] | <mstenta[m]> | is your code in github to look at? |
| [16:44:03] | <mstenta[m]> | might be something simple |
| [16:44:08] | <shane_aldrich[m]> | not yet. I just copied and pasted the egg example and replaced egg with fungi |
| [16:45:37] | <shane_aldrich[m]> | it should be on github now |
| [16:45:43] | <shane_aldrich[m]> | `0.0.1` branch |
| [16:46:20] | <shane_aldrich[m]> | https://github.com/s33a/farm_shane_fungi/blob/0.0.1/src/Plugin/QuickForm... |
| [16:46:42] | <mstenta[m]> | oooh! |
| [16:46:46] | <mstenta[m]> | i know... |
| [16:46:51] | <mstenta[m]> | we made a last minute change |
| [16:47:11] | <shane_aldrich[m]> | so not documented |
| [16:48:17] | <mstenta[m]> | change `use Drupal\farm_quick\QuickFormBase;` to `use Drupal\farm_quick\Plugin\QuickForm\QuickFormBase;` |
| [16:48:25] | <mstenta[m]> | correct - the docs are wrong... i will fix that |
| [16:49:35] | <shane_aldrich[m]> | Well... that corrected the problem in phpStorm. I will uninstall and reinstall to see what happens. |
| [16:50:28] | <mstenta[m]> | no need |
| [16:50:31] | <mstenta[m]> | just refresh the page |
| [16:50:32] | <mstenta[m]> | should do |
| [16:50:39] | <mstenta[m]> | might need to `drush cr` |
| [16:51:14] | <shane_aldrich[m]> | `drush cr` gave me an error I think |
| [16:51:28] | <mstenta[m]> | fixed the docs: https://github.com/farmOS/farmOS/commit/ceb7123384c2956fa2a1e509cf2536cb... |
| [16:52:00] | <shane_aldrich[m]> | It probably has to do with my alias pointing to the wrong directory. I'll check that now |
| [16:52:23] | <mstenta[m]> | oh yea... that's the problem with aliases |
| [16:52:40] | <mstenta[m]> | alternatively: `docker-compose exec -u www-data drush ...` should work |
| [16:52:47] | <mstenta[m]> | (from the same dir as `docker-compose.yml`) |
| [16:53:50] | <mstenta[m]> | i have to sign off - family time! good luck shane_aldrich ! hope that gets you going! |
| [16:54:35] | <shane_aldrich[m]> | thank you! enjoy! |
| [16:56:19] | <shane_aldrich[m]> | `drush` error is `In Connection.php line 135: could not find driver` |
| [16:56:28] | <shane_aldrich[m]> | trying docker next |
| [16:57:28] | <shane_aldrich[m]> | `drush is not running container #1` |