Try this:
storage_opt: size: '1G'
as in https://docs.docker.com/compose/compose-file/compose-file-v2/