< 132020-10-14⋎15 >

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

< 132020-10-14⋏15 >