Implement model configuration and doctrine entity manager as a container service.