booru / philomena

Next-generation imageboard software. This software development project is independent from any image hosting project.
GNU Affero General Public License v3.0
9 stars 10 forks source link

fix elastic data mount path #97

Closed cultpony closed 3 years ago

cultpony commented 3 years ago

Before you begin


Elastic mounted the wrong folder into the FS: https://www.elastic.co/guide/en/elasticsearch/reference/7.8/docker.html

Before elastic is started again, ensure that the permissions for the ./local-data/elastic folder are 777 so elastic can spawn the proper folders inside.

basisbit commented 3 years ago

Before elastic is started again, ensure that the permissions for the ./local-data/elastic folder are 777 so elastic can spawn the proper folders inside.

Why would that be necessary to do? Only the docker container would have created that folder, so there should be no need to change anything there. If however there is some need to change permissions, then that should probably be added to the container build script?

cultpony commented 3 years ago

Why would that be necessary to do? Only the docker container would have created that folder, so there should be no need to change anything there. If however there is some need to change permissions, then that should probably be added to the container build script?

Only for the first run. The issue is that elastic doesn't run as root, there is no init script that could fix it, since the script would run as non-root as well. The folder ./local-data/elastic is created by docker-compose on first startup with local user permissions, which isn't the same as the container user. Once the permissions are changed, this shouldn't be necessary ever again.