crazy-max / docker-dokuwiki

DokuWiki Docker image
MIT License
43 stars 19 forks source link

Support for an option to disable reindex behavior #25

Closed apollo13 closed 3 years ago

apollo13 commented 3 years ago

Currently the image unconditionally runs the indexer during startup https://github.com/crazy-max/docker-dokuwiki/blob/916478cc050d45f5c6759e6b59465b049e0958d3/rootfs/etc/cont-init.d/03-config.sh#L119

Since the whole data directory is mapped this should usually not be needed. It would be great if it were possible to add an option to disable indexing (after all the pages + index should be in sync anyways). What is the rationale behind reindexing? Depending on the fs and wiki size this can be rather slow so I'd like to avoid it.

I see two options:

Personally I'd go for option 1, but maybe I miss an important reason for doing this during startup. I Could write a PR if you tell me which approach you'd prefer.

crazy-max commented 3 years ago

@apollo13 I have added DOKUWIKI_RUN_INDEXER env var to control the indexer. You can try it with crazymax/dokuwiki:edge.

apollo13 commented 3 years ago

Thanks, verified that it is working properly.