Thanks for the example. I'll probably just stick with a short shell script for my service coordination instead of docker compose to reduce the complexity I have to deal with.
But reading through your example brought back a question I had when I was trying to manually set up security. As far as I can tell, the script in the compose file above is just running the steps necessary to set up basic security for the Elastic stack. The compose script and the linked official documentation seem to be doing the same thing, except the script has this additional step where you change the file permissions on the certificate files which the documentation never mentions.
Say I did want to set up basic security manually, do I have to do some file permission work in addition to the steps outlined in the documentation?
I ask because I did try to follow the manual setup steps and at one point got stopped by a mysterious error that I worked around by setting global read write permissions for the certificate files. Or at least I think that's how I got around it. I was deep in the weeds at that point and just trying a bunch of stuff so I can't be sure what worked, but I think file permissions was it.