-
Notifications
You must be signed in to change notification settings - Fork 157
Description
I've noticed that when restarting my server Docker will restart the graylog container but mongodb or open-search.
I'm also aware these examples are for testing, and previously they were changed to be restart: "on failure" rather than always, but I think it's still not expected behaviour.
But this may not be a graylog or even docker-compose issue - please correct me where Im wrong:
Current behaviour:
docker compose up: all containers start
docker compose up graylog: all containers start
restart server: graylog starts, other containers don't
Expected behaviour:
restart server: all containers previously running start, and graylog waits for mongodb and opensearch to be ready.
There are 2 failsafe's in the docker-compose for making sure the requisite services are started before graylog starts:
- depends_on
- entrypoint wait-for-it.sh waits for opensearch to be available at opensearch:9200
re. 1 - apparently docker doesn't know about docker-compose variables, and so depends_on is ignored - it just restarts previously running containers. Not ideal, but regardless in this instance it only restarts graylog.
re. 2 - shouldn't the wait-for-it.sh script fire even when restarting the container after a server restart?
Any ideas?