Look at this for inspiration: https://github.com/docker/genai-stack/blob/main/docker-compose.yml
The issue might be NEO4J_URI=bolt://172.20.0.3:7687, try NEO4J_URI=neo4j://neo4j:7687
NEO4J_URI=bolt://172.20.0.3:7687
NEO4J_URI=neo4j://neo4j:7687