Inspiration
dockerfile – generate a self signed certificate in docker – Stack Overflow
Repos
Lets test the ssl script first, since we know that rmq and portainer works.
All files are moved

cd rmq5-portainer-ssl
~/rmq5-portainer-ssl$ bash generate.certificate.sh
Files

How about that?!
Now we need to copy the cert and edit the Dockerfile and rabbitmq.config (view github Dockerfile)
# stil in rmq5-portainer-ssl
docker compose up -d

docker compose logs or view portainer

Add a queue and msg
docker compose down
docker compose up -d
Persistent = yes