[23:31:36] | * canadrian[m] has joined #farmos |
[09:59:57] | <mstenta[m]> | FYI today is the monthly call: https://farmos.org/community/monthly-call/ |
[10:00:01] | <mstenta[m]> | https://twitter.com/JamieGaehring/status/1316377077671747586 |
[11:45:44] | * munjoma[m] has joined #farmos |
[12:11:50] | * mindcls[m] has quit (Quit: Idle for 30+ days) |
[16:21:02] | <skalakm[m]> | ACTION sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/jFdJGVLVojohsrUP... > |
[16:21:39] | <skalakm[m]> | anyone have any ideas? I don't even know if this is a docker problem or a farmos problem or a drupal problem. |
[16:21:52] | <mstenta[m]> | Hi skalakm |
[16:22:03] | <mstenta[m]> | So is your `./www` folder empty after you start the container? |
[16:22:23] | <skalakm[m]> | it has a sites directory and thats it |
[16:22:42] | <mstenta[m]> | Oh I know why... |
[16:22:58] | <mstenta[m]> | This is sort of an oversight in the design of the Dockerfiles perhaps... |
[16:23:15] | <mstenta[m]> | The production Dockerfile includes this entrypoint: https://github.com/farmOS/farmOS/blob/7.x-1.x/docker/docker-entrypoint.sh |
[16:23:36] | <mstenta[m]> | Which assumes that you are not mounting the whole codebase as a volume, only the sites directory |
[16:23:43] | <skalakm[m]> | I have that in the folder. |
[16:23:52] | <mstenta[m]> | The dev Dockerfile assumes the whole codebase: https://github.com/farmOS/farmOS/blob/7.x-1.x/docker/dev/docker-entrypoi... |
[16:24:26] | <mstenta[m]> | So in other words: right now the production Docker image only works if you ONLY mount the sites directoy... not the whole codebase |
[16:24:49] | <mstenta[m]> | FWIW, in farmOS 2.x I've taken a different approach, which works in all cases... so we may want to consider backporting that to 1.x |
[16:24:56] | <skalakm[m]> | So if I use the dev entrypoint it will work? |
[16:25:25] | <mstenta[m]> | Yes, but the entrypoint script is built into the Docker image... so you will need to do that yourself |
[16:30:19] | <skalakm[m]> | So I should use the dev dockerfile and the dev entrypoint? |
[16:30:46] | <mstenta[m]> | No - the dev dockerfile has xdebug - you don't want that in production |
[16:30:52] | <mstenta[m]> | Your choice is: |
[16:31:41] | <mstenta[m]> | 1. Use the production image and only mount in the `/var/www/html/sites` directory |
[16:31:41] | <mstenta[m]> | 2. Create a custom Dockerfile and docker-entrypoint.sh so that you can mount the whole `/var/www/html` directory. |
[16:32:23] | <mstenta[m]> | (And bigger picture, it would be good for farmOS to backport the way we're doing it in 2.x so that you have more flexibility - but no guarantees that will happen anytime soon) |
[16:33:27] | <mstenta[m]> | (This is all assuming that you're setting up a production environment. Not a development environment?) |
[16:34:14] | <skalakm[m]> | It's more of a dev environment. The goal is the basically have the dev tools, but at a fixed version. |
[16:34:37] | <mstenta[m]> | Oh |
[16:34:55] | <mstenta[m]> | Well then just use the dev Dockerfile :-) |
[16:35:06] | <mstenta[m]> | The way it works is: |
[16:36:51] | <mstenta[m]> | When the container starts, it checks to see if `/var/www/html` is empty (which is true when you bind-mount a local folder into the container). If it's empty, it copies the codebase from `/tmp/www/` (this is where Drush Make builds the codebase inside the container) to `/var/www/html`. |
[16:37:00] | <mstenta[m]> | But at that point, you have full control over the `www` folder. |
[16:37:15] | <mstenta[m]> | So you could delete everything and just download the version of the codebase you want. |
[16:38:49] | <mstenta[m]> | The production image tries to take care of core farmOS updates for you - by ONLY mounting in the `/var/www/html/sites` directory, which is the only directory you keep when you update farmOS. |
[16:39:00] | <mstenta[m]> | Sorry - it is definitely confusing - it's not you ;-) |
[16:39:38] | <skalakm[m]> | Wouldnt it be easier to change the dev Dockerfile to inherit from 1.5? |
[16:40:25] | <mstenta[m]> | The dev Dockerfile works differently than the production one |
[16:40:43] | <mstenta[m]> | The production one downloads the appropriate version tarball from https://drupal.org/project/farm |
[16:41:13] | <mstenta[m]> | The dev one builds the codebase from scratch using Drush Make, according to the `FARMOS_BRANCH` build argument: |
[16:41:22] | <mstenta[m]> | https://github.com/farmOS/farmOS/blob/92f854b9be271e06f2e005f14d64653eb4... |
[16:41:39] | <mstenta[m]> | vs production: https://github.com/farmOS/farmOS/blob/92f854b9be271e06f2e005f14d64653eb4... |
[16:41:51] | <mstenta[m]> | So the Docker image version doesn't really matter |
[16:42:27] | <mstenta[m]> | Inheriting from `farmos/farmos:7.x-1.5` would not result in 7.x-1.5 on the dev image |
[16:43:25] | <mstenta[m]> | But if your goal is just to have 7.x-1.5 running in the dev container, then do this: |
[16:44:50] | <mstenta[m]> | 1. Follow the instructions to create a dev container with docker compose - this will build the `./www` folder for you with the codebase |
[16:44:50] | <mstenta[m]> | 2. Delete everything in `./www` |
[16:44:50] | <mstenta[m]> | 3. Download and unpack the 7.x-1.5 tarball into `./www` |
[16:45:14] | <mstenta[m]> | > Delete everything in ./www |
[16:45:14] | <mstenta[m]> | !!! This is assuming you are starting fresh! Don't delete anything you don't have backed up !!! :-) |
[16:45:42] | <mstenta[m]> | Hope that helps! Sorry I have to run! |
[16:45:58] | <mstenta[m]> | Will check back later if you have more questions - feel free to leave them here in chat |
[16:46:05] | <skalakm[m]> | So this would not be a part of the docker-compose process? Other than step 1? |
[16:46:19] | <skalakm[m]> | okay, thanks again |
[16:46:37] | <mstenta[m]> | Correct - you are basically just taking the codebase that the dev image provided you and replacing it with one you downloaded |
[16:46:57] | <skalakm[m]> | Okay, that helps a lot. Thanks. |
[16:47:03] | <mstenta[m]> | Sure thing! Good luck! |
[18:13:29] | * svenn has quit (Ping timeout: 272 seconds) |
[18:13:39] | * svenn has joined #farmos |