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

Optimize mounts #4

Closed
solarkraft opened this issue Aug 30, 2021 · 8 comments
Closed

Optimize mounts #4

solarkraft opened this issue Aug 30, 2021 · 8 comments

Comments

@solarkraft
Copy link
Member

solarkraft commented Aug 30, 2021

Currently a lot (all of the Dokuwiki installation?) is thrown into /config, much more than needed.

Idea: ./config, ./data, cache as volume

From Readme:

config/dokuwiki/conf/
config/dokuwiki/data/
config/dokuwiki/lib/ -> volume?

@solarkraft
Copy link
Member Author

Success metric: It should be possible to rebuild the container without losing meaningful local state.

@solarkraft
Copy link
Member Author

solarkraft commented Sep 9, 2021

./data/conf/:/config/dokuwiki/conf/
./data/data/:/config/dokuwiki/data/
./data/lib/:/config/dokuwiki/lib/

Leads to

DokuWiki Setup Error

The datadir ('pages') at /pages is not found, isn't accessible or writable. You should check your config and permission settings. Or maybe you want to run the installer?

including after running fixperms.php, which reports no errors, but only lists paths in /app.

@solarkraft
Copy link
Member Author

solarkraft commented Sep 9, 2021

It works just fine with no mounts at all. Errors as soon as /config/dokuwiki/conf is a volume. /config/dokuwiki/data does not cause issues.

All of /config/dokuwiki/ being mounted does not cause problems.

All directories inside of /config/dokuwiki/ being volumes individually results in the same error.

We're copying stuff into /config/dokuwiki/conf, aren't we?

@solarkraft
Copy link
Member Author

Turns out that it all works when you docker-compose down between changes.

@solarkraft
Copy link
Member Author

solarkraft commented Sep 9, 2021

Nope, not always.

/config/dokuwiki/conf as a volume (semi-) reliably produces the issue on Docker for macOS. With Lima it's no problem (but it doesn't work properly with this container due to lima-vm/lima#231). Cool.

Issue also present on Linux.

@solarkraft
Copy link
Member Author

solarkraft commented Sep 9, 2021

Turns out that it all works when you docker-compose down between changes.

I wish. Not at all, actually. I wonder why it briefly seemed to work.

@solarkraft
Copy link
Member Author

If /config/dokuwiki/conf exists before the step "Move user folders to persistent storage" in 50-config (which it does when explicitly mounted), the error occurs.

However it's apparently not due to the [[ -d /app/dokuwiki/"${i}" ]] && \ check (only copies if the directory doesn't exist) - it also occurs when conf is explicitly copied. It does not seem to directly relate to the copying of data/pages, as that happens either way.

image

@solarkraft
Copy link
Member Author

Related to dokuwiki/dokuwiki#3520 ?

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

1 participant