Skip to content

Buckets

A bucket is a set of files that belongs to a project. Every machine of the project can use its buckets by name: to publish a static site or a front end, to keep files that several machines need, to hand out downloads. A web portal can serve a bucket, to anyone and while the machine is suspended.

Note

Today every bucket is public: anyone with a file’s address can fetch it, signed in or not, so put nothing in one that you wouldn’t put on a public web page. Private buckets are coming soon. Until then, for files that only some people should get, use artifacts and shares.

space-env bucket create site
space-env bucket put site dist/ --prune
space-env bucket ls site
space-env bucket rm site old.html
space-env bucket list
  • Paths, not directories: index.html, assets/app.css, with the content type from the extension. A file already in the bucket, under any path, isn’t uploaded again.
  • put takes a file, a directory or a tar stream; --prune removes what the directory no longer has, and diff shows what would change first. rm removes files, delete the bucket.
  • Names are 1 to 63 characters of a-z, 0-9 and -, unique in the project.
  • Limits: 256 MiB per file, 100 buckets per project, storage as your plan allows; --max-bytes caps one bucket.

Serve a site from a bucket

On a machine behind a web portal, space-env bucket serve site makes the portal answer from the bucket: the files it has come from the bucket, without resuming the machine; everything else still reaches your service. A static site from a bucket has the whole story: a deploy script, inline prefixes, and what the portal answers from where.

Every option is in the space-env reference.

Last updated on