| 03:31 | * | canadrian[m] has joined |
| 13:59 | mstenta[m] | FYI today is the monthly call: farmos.org/community/monthly-call/ |
| 14:00 | mstenta[m] | twitter.com/JamieGaehring/status/1316377 |
| 15:45 | * | munjoma[m] has joined |
| 16:11 | * | mindcls[m] has quit (Quit: Idle for 30+ days) |
| 20:21 | * | sent a long message: < matrix.org/_matrix/media/r0/download/mat > |
| 20:21 | 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. |
| 20:21 | mstenta[m] | Hi skalakm |
| 20:22 | mstenta[m] | So is your `./www` folder empty after you start the container? |
| 20:22 | skalakm[m] | it has a sites directory and thats it |
| 20:22 | mstenta[m] | Oh I know why... |
| 20:22 | mstenta[m] | This is sort of an oversight in the design of the Dockerfiles perhaps... |
| 20:23 | mstenta[m] | The production Dockerfile includes this entrypoint: github.com/farmOS/farmOS/blob/7.x-1.x/do |
| 20:23 | mstenta[m] | Which assumes that you are not mounting the whole codebase as a volume, only the sites directory |
| 20:23 | skalakm[m] | I have that in the folder. |
| 20:23 | mstenta[m] | The dev Dockerfile assumes the whole codebase: github.com/farmOS/farmOS/blob/7.x-1.x/do |
| 20:24 | 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 |
| 20:24 | 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 |
| 20:24 | skalakm[m] | So if I use the dev entrypoint it will work? |
| 20:25 | mstenta[m] | Yes, but the entrypoint script is built into the Docker image... so you will need to do that yourself |
| 20:30 | skalakm[m] | So I should use the dev dockerfile and the dev entrypoint? |
| 20:30 | mstenta[m] | No - the dev dockerfile has xdebug - you don't want that in production |
| 20:30 | mstenta[m] | Your choice is: |
| 20:31 | mstenta[m] | 1. Use the production image and only mount in the `/var/www/html/sites` directory |
| 20:31 | mstenta[m] | 2. Create a custom Dockerfile and docker-entrypoint.sh so that you can mount the whole `/var/www/html` directory. |
| 20:32 | 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) |
| 20:33 | mstenta[m] | (This is all assuming that you're setting up a production environment. Not a development environment?) |
| 20:34 | skalakm[m] | It's more of a dev environment. The goal is the basically have the dev tools, but at a fixed version. |
| 20:34 | mstenta[m] | Oh |
| 20:34 | mstenta[m] | Well then just use the dev Dockerfile :-) |
| 20:35 | mstenta[m] | The way it works is: |
| 20:36 | 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`. |
| 20:37 | mstenta[m] | But at that point, you have full control over the `www` folder. |
| 20:37 | mstenta[m] | So you could delete everything and just download the version of the codebase you want. |
| 20:38 | 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. |
| 20:39 | mstenta[m] | Sorry - it is definitely confusing - it's not you ;-) |
| 20:39 | skalakm[m] | Wouldnt it be easier to change the dev Dockerfile to inherit from 1.5? |
| 20:40 | mstenta[m] | The dev Dockerfile works differently than the production one |
| 20:40 | mstenta[m] | The production one downloads the appropriate version tarball from drupal.org/project/farm |
| 20:41 | mstenta[m] | The dev one builds the codebase from scratch using Drush Make, according to the `FARMOS_BRANCH` build argument: |
| 20:41 | mstenta[m] | github.com/farmOS/farmOS/blob/92f854b9be |
| 20:41 | mstenta[m] | vs production: github.com/farmOS/farmOS/blob/92f854b9be |
| 20:41 | mstenta[m] | So the Docker image version doesn't really matter |
| 20:42 | mstenta[m] | Inheriting from `farmos/farmos:7.x-1.5` would not result in 7.x-1.5 on the dev image |
| 20:43 | mstenta[m] | But if your goal is just to have 7.x-1.5 running in the dev container, then do this: |
| 20:44 | 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 |
| 20:44 | mstenta[m] | 2. Delete everything in `./www` |
| 20:44 | mstenta[m] | 3. Download and unpack the 7.x-1.5 tarball into `./www` |
| 20:45 | mstenta[m] | > Delete everything in ./www |
| 20:45 | mstenta[m] | !!! This is assuming you are starting fresh! Don't delete anything you don't have backed up !!! :-) |
| 20:45 | mstenta[m] | Hope that helps! Sorry I have to run! |
| 20:45 | mstenta[m] | Will check back later if you have more questions - feel free to leave them here in chat |
| 20:46 | skalakm[m] | So this would not be a part of the docker-compose process? Other than step 1? |
| 20:46 | skalakm[m] | okay, thanks again |
| 20:46 | mstenta[m] | Correct - you are basically just taking the codebase that the dev image provided you and replacing it with one you downloaded |
| 20:46 | skalakm[m] | Okay, that helps a lot. Thanks. |
| 20:47 | mstenta[m] | Sure thing! Good luck! |
| 22:13 | * | svenn has quit (Ping timeout: 272 seconds) |
| 22:13 | * | svenn has joined |