# Ions deployment and static assets

**URL:** <https://forum.datomic.com/t/ions-deployment-and-static-assets/1200>\
**Category:** Datomic Cloud\
**Created:** [October 8, 2019, 9:20am UTC](https://forum.datomic.com/t/ions-deployment-and-static-assets/1200 "2019-10-08T09:20:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tslocke](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/tslocke/32/233_2.png) [@tslocke](https://forum.datomic.com/u/tslocke)\
**Post date:** [October 8, 2019, 9:20am UTC](https://forum.datomic.com/t/ions-deployment-and-static-assets/1200/1 "2019-10-08T09:20:12Z")

</div>

What are people doing for deploying static assets for apps running on Ions? S3/CloudFront is a given, but I’m thinking more about the deployment process.

A good solution would make it easy to keep assets and the deployed version in sync, taking into account failures and rollbacks. There’s also small details like asset URLs working in dev/staging/prod.

I’ve searched to no avail. Is everyone just rolling their own?

---

<div class="post-metadata">

**Author:** ![tslocke](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/tslocke/32/233_2.png) [@tslocke](https://forum.datomic.com/u/tslocke)\
**Post date:** [November 9, 2019, 1:03pm UTC](https://forum.datomic.com/t/ions-deployment-and-static-assets/1200/2 "2019-11-09T13:03:28Z")

</div>

Since no one responded, I’ll update the post with what I’ve learned in the mean time. It turns out, static assets don’t need to be handled separately at all. They are included in the deployed bundle, and, are available as resources on the classpath. In my case I’m running a normal ring app via ions, and there’s one gotcha. See:

> [@\[SOLVED\] \`ionize\` does not handle responses with a :body of type File](https://forum.datomic.com/t/solved-ionize-does-not-handle-responses-with-a-body-of-type-file/1018):
>
> I’m deploying a backend as a web ion that uses the ring.middleware.defaults/site-defaults middleware. The middleware includes the ring.middleware.resource middleware to serve files from my resources/public/ directory. This worked fine locally, but when I deployed to Datomic Cloud and hit an endpoint that should serve up the contents of a file, I instead got an error response with the following body: error: No implementation of method: :-\>bbuf of protocol: #'datomic.ion.lambda.api-gateway/ToBbu…

I’m now looking into using optimus [1] for a more production-grade way to serve the assets.

The final issue which I mentioned in the original post is rollbacks for failed deploys. Given static assets are deployed along with the server code, there should be no issue about keeping things in sync, but I have another problem in that rollbacks are not happening at all. I posted separately about that but again no replies (so far).

Cheers

Tom

[1] [GitHub - magnars/optimus: A Ring middleware for frontend performance optimization.](https://github.com/magnars/optimus)
