I have multiple Amazon Linux 2 boxes acting as Docker hosts, as the instances are needed Mon-Fri 9am-5pm, in an effort to save costs Shutdown tags that allow specific stop/start times have been implemented. I'm concerned that issuing stop-instances isn't gracefully shutting down the containers and may lead to volume corruption.
How can I make it so that when stop-instances is issued, the docker host is able to react and issue docker-compose down and then on instance startup issue docker-compose up -d?