Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer not compatible with DDEV #1961

Open
BernhardBaumrock opened this issue Aug 19, 2024 · 2 comments
Open

Installer not compatible with DDEV #1961

BernhardBaumrock opened this issue Aug 19, 2024 · 2 comments

Comments

@BernhardBaumrock
Copy link

Short description of the issue

DDEV is a great docker based development environment. I wanted to add it to the list of supported CMSs here: https://ddev.readthedocs.io/en/stable/users/quickstart/

While trying to find the best commands I found out that when using the config option --upload-dirs='site/assets/files' the processwire installer won't run properly.

Expected behavior

It should be able to use --upload-dirs='site/assets/files' in DDEV and still be able to install PW.

Actual behavior

Please see the screenshot of the problem here: ddev/ddev#6381 (comment)

Explanation

The "upload-dirs" config setting tells DDEV to bind-mount that directory to the container. If that is not set, ddev will always show a warning about it being not defined. Also DDEV has a feature called "mutagen" which will create full copies of all files inside the container rather than mounting the whole folder. This is great for performance (very fast load times), but it is not so great when large files have to be synced.

That's why I recommend adding /site/assets/files to the upload_dirs setting, but everybody can add any other folders as well (like site/assets/cache or such).

Optional: Suggestion for a possible fix

In the linked issue above I asked if DDEV can do anything about the issue, but I got the answer that the folder needs to be created on startup so that docker can mount it properly, which makes sense. So I think PW should be a little more specific about the check if PW is already installed and not only check for the "site" folder being present.

For example it could check for /site and /site/config.php and only in that case jump to the next step of the installation.

Steps to reproduce the issue

  1. Download PW
  2. Create an empty folder /site/assets/files
  3. Run the installer
@rfay
Copy link

rfay commented Aug 19, 2024

It's not actually that it's not compatible with DDEV, it's that it's using too simplistic a technique to see if the site has been installed. It could look for what's inside the site directory instead of just its existence.

(This is also only when performance_mode: mutagen, which is the default for macOS.) It won't happen on Linux/WSL2. The actual mechanics are described in ddev/ddev#6381 (comment)

@BernhardBaumrock
Copy link
Author

It's not actually that it's not compatible with DDEV, it's that it's using too simplistic a technique to see if the site has been installed. It could look for what's inside the site directory instead of just its existence.

Yeah that's what I suggested as possible fix :)

(This is also only when performance_mode: mutagen, which is the default for macOS.) It won't happen on Linux/WSL2. The actual mechanics are described in ddev/ddev#6381 (comment)

Thx for the clarification!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants