The docker-compose example file should not be used in a production environment. The example file does not have an explicit handling of docker volumes for PostgreSQL and RabbitMQ.
Only use the example docker-compose file as a reference to write your own file. Otherwise you risk data loss if the volumes are not handled correctly for your setup.