I want to deploy in Docker Swarm a stack with a MongoDB and a Web Server; the db must be filled with initial data and I found out this valid solution. Given that Stack services start in casual order, how could I be sure that the Web Server will read initial data correctly?
Probably I need some notification system (Redis?), but I am new to MongoDB, so I am looking for well-known solutions to this problem (that I think is pretty common).