NYCPlanning / labs-geosearch-docker

Main repository for running the Planning Labs geosearch API powered by pelias
12 stars 3 forks source link

Consider adding a section to the README on DOCKER_USER and/or data directory permissions #44

Open toolness opened 4 years ago

toolness commented 4 years ago

When going through the README instructions, we ran into some file permission errors because containers couldn't write to the data directory. This is likely because our uid on our system was 1000, while the one specified in the .env file as DOCKER_USER was 1100. We actually just ended up making the data and data/elasticsearch directories world-writable, but a more secure fix would probably involve adding a section to the README advising the user to set DOCKER_USER to a value appropriate for their system. Since that would involve editing the version-controlled .env file, however, it might make sense to rename .env to .env.sample and have the user explicitly create their own .env file.

SPTKL commented 3 years ago

I agree! I think the default 1100 is mostly set up to work with the setupServer.sh script https://github.com/NYCPlanning/labs-geosearch-docker/blob/5b2d889b52c37ce62527b77c500b02b7836ba279/setupServer.sh#L9

We can probably change the setupServer.sh so that it would take the uid from the .env file