Generate a sample docker compose

def generate_docker_compose(self):
        """ Generate a sample docker compose
        """
        example = {}
        example['app'] = {}
        example['app']['environment'] = []
        for key in sorted(list(self.spec.keys())):
            if self.spec[key]['type'] in (dict, list):
                value = f"\'{json.dumps(self.spec[key].get('example', ''))}\'"
            else:
                value = f"{self.spec[key].get('example', '')}"
            example['app']['environment'].append(f"{self.env_prefix}_{key.upper()}={value}")
        print(yaml.dump(example, default_flow_style=False))