It really depends on your use-case here.
If you’re able to spin up an environment via docker-compose and play against that with playwright, then I think that’s good for that use-case.
However, if you’re testing a flow that relies on some initial state, it can sometimes be tricky to seed that state or do so in a way which is representative.