Open policy agent

how to use opa in docker compose file traefik?

Did you check the doc? It seems it requires (paid) Traefik Enterprise.