{"id":32195763,"url":"https://github.com/tailrecursion/boot-bucket","last_synced_at":"2025-10-22T02:20:22.104Z","repository":{"id":62434802,"uuid":"72945265","full_name":"tailrecursion/boot-bucket","owner":"tailrecursion","description":"task for syncing boot output to an amazon web services (aws) s3 bucket.","archived":false,"fork":false,"pushed_at":"2020-02-15T21:32:49.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-30T17:54:58.685Z","etag":null,"topics":["aws","boot","boot-bucket","bucket","s3","s3-bucket"],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailrecursion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-05T18:24:15.000Z","updated_at":"2020-02-15T21:32:51.000Z","dependencies_parsed_at":"2022-11-01T21:02:24.961Z","dependency_job_id":null,"html_url":"https://github.com/tailrecursion/boot-bucket","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tailrecursion/boot-bucket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fboot-bucket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fboot-bucket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fboot-bucket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fboot-bucket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailrecursion","download_url":"https://codeload.github.com/tailrecursion/boot-bucket/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fboot-bucket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280365632,"owners_count":26318389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","boot","boot-bucket","bucket","s3","s3-bucket"],"created_at":"2025-10-22T02:20:20.802Z","updated_at":"2025-10-22T02:20:22.096Z","avatar_url":"https://github.com/tailrecursion.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# boot-bucket\n\na boot task for spewing files into an S3 bucket.\n\n[](dependency)\n```clojure\n[tailrecursion/boot-bucket \"2.1.2\"] ;; latest release\n```\n[](/dependency)\n\n## overview\n\nthe `spew` task uploads any files whose filenames or hashes differ from those in\nthe targeted S3 bucket, then decorates them with boot metadata so they may be\nidentified by subsequent tasks (see [boot-front](https://github.com/tailrecursion/boot-front)).\n\nthe files themselves may also be individually adorned with AWS metadata to\nconfigure HTTP headers in S3 and cloundfront.\n\n## canned access control lists (ACLs)\n\nin a departure from previous releases, as of `2.0.0`, boot-bucket defaults to\nthe `:private` canned ACL, which should be changed to `:public-read` when\nserving files from an S3 bucket.  alternatively, any of the following canned ACL\nkeywords may be specified to the `canned-acl` parameter:\n\n```\n:private (default)\n:log-delivery-write\n:bucket-owner-read\n:bucket-owner-full-control\n:authenticated-read\n:public-read\n:public-read-write\n```\n\ncustom acls are currently unsupported, but pull requests are most welcome.\n\n## metadata\nboth user and system metadata may be passed to the `metadata` parameter in the\nsame map to modify the http headers served up by S3. these are supported on a\nper-file basis of the form `{\"\u003cfilename\u003e\" {:\u003cmeta-key\u003e \"\u003cmeta-value\u003e\"}}`. an\nexample is shown below:\n\n```\n{\"index.html.js\" {:content-encoding \"gzip\"}}\n```\n\n## usage\n\nthe following is an excerpt of a `build.boot' file using boot-bucket together\nwith [boot-front][1] for deployments:\n\n```clojure\n(require\n  '[adzerk.boot-cljs          :refer [cljs]]\n  '[adzerk.boot-reload        :refer [reload]]\n  '[hoplon.boot-hoplon        :refer [hoplon]]\n  '[tailrecursion.boot-bucket :refer [spew]]\n  '[tailrecursion.boot-front  :refer [burst]]\n  '[tailrecursion.boot-static :refer [serve]])\n\n(def buckets\n  {:production \"\u003cappname\u003e-production-application\"\n   :staging    \"\u003cappname\u003e-staging-application\"})\n\n(def distributions\n  {:production \"\u003cproduction-cloudfront-id\u003e\"\n   :staging    \"\u003cstaging-cloudfront-id\u003e\"})\n\n(deftask develop\n  \"Continuously rebuild the application during development.\"\n  [o optimizations OPM kw \"Optimizations to pass the cljs compiler.\"]\n  (let [o (or optimizations :none)]\n    (comp (watch) (speak) (hoplon) (target) (reload) (cljs :optimizations o) (serve))))\n\n(deftask build\n  \"Build the application with advanced optimizations.\"\n  [o optimizations OPM kw \"Optimizations to pass the cljs compiler.\"]\n  (let [o (or optimizations :advanced)]\n    (comp (speak) (hoplon) (cljs :optimizations o :compiler-options {:elide-asserts true}) (sift))))\n\n(deftask deploy\n  \"Build the application with advanced optimizations then deploy it to s3.\"\n  [e environment   ENV kw \"The application environment to be utilized by the service.\"\n   o optimizations OPM kw \"Optimizations to pass the cljs compiler.\"]\n  (assert environment \"Missing required environment argument.\")\n  (let [b (buckets       environment)\n        d (distributions environment)]\n    (comp (build :optimizations optimizations) (spew :bucket b) (burst :distribution d))))\n\n(task-options!\n  serve {:port 3001}\n  sift  {:include #{#\"index.html.out/\" #\"\u003capp-ns\u003e/\"} :invert true}\n  spew  {:canned-acl :public-read\n         :region     \"us-east-1\"\n         :access-key (System/getenv \"\u003cAWS_ACCESS_KEY_ENV_VAR\u003e\")\n         :secret-key (System/getenv \"\u003cAWS_SECRET_KEY_ENV_VAR\u003e\")}\n  burst {:access-key (System/getenv \"\u003cAWS_ACCESS_KEY_ENV_VAR\u003e\")\n         :secret-key (System/getenv \"\u003cAWS_SECRET_KEY_ENV_VAR\u003e\")})\n```\n\n# aot gzipping\n\nthe `Content-Encoding` header may be set to `\"gzip\"` for a large file such as\nan `index.html.js` artifact that was compressed upstream by another task like\n[boot-gzip][2]:\n\n```clojure\n(spew\n :canned-acl :public-read\n :region     \"us-east-1\"\n :access-key \"\u003caws-access-key\u003e\"\n :secret-key \"\u003caws-secret-key\u003e\"\n :metadata   {\"index.html.js\" {:content-encoding \"gzip\"}})\n```\n\nnote that it's often good practice to zip the output from the CLJS compiler.\nboot-gzip may drop the file size as much as 80%, which results in a much better\nperformance when serving a website from an S3 bucket and conserves space in S3.\nfurtherwore, even when deploying the resulting javascript artifact behind\ncloudfront with the built-in compression enabled, if the file size exceeds\n10MB, it will be ignored.\n\nalso note that front will not apply on-the-fly compression to any file with the\n`Content-Encoding` header set, so be careful to only set it on files that have\nbeen gzipped during deployment.\n\n[1]: http://github.com/tailrecursion/boot-front\n[2]: https://github.com/martinklepsch/boot-gzip\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailrecursion%2Fboot-bucket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailrecursion%2Fboot-bucket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailrecursion%2Fboot-bucket/lists"}