@staticdefines S3 buckets for hosting static assets, uploaded from
- Requires two arguments:
- Each argument should be followed by a valid globally unique S3 bucket name
fingerprintsetting, enabling static asset file fingerprinting (and long-lived caching headers)
ignore, which ignores files from
.arc file defines static buckets and their options:
@app testapp @static staging test-bukkit production main-bukkit fingerprint true ignore .tar.gz tmp user
Note: S3 buckets are global to AWS so if at first you don't succeed, try picking another bucket name
Locally, if the folder
public/ exists, whenever you run
npx deploy the contents are published to the
staging bucket. If you set
ARC_DEPLOY=production the contents of
public/ are deployed to the production bucket.
To only deploy static assets from
/public (and not function sources from
/src), you can provide any of
-s flags, i.e.
npx deploy static.
To delete remote static assets on the S3 bucket that do not exist locally, provide the optional
--delete flag, i.e.
npx deploy static --prune.