This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-08
Channels
- # aws (21)
- # beginners (62)
- # boot (29)
- # chestnut (1)
- # cider (110)
- # cljs-dev (37)
- # clojure (93)
- # clojure-berlin (1)
- # clojure-dev (10)
- # clojure-greece (4)
- # clojure-italy (5)
- # clojure-new-zealand (1)
- # clojure-spec (6)
- # clojure-uk (46)
- # clojurebridge (1)
- # clojurescript (54)
- # cryogen (1)
- # cursive (22)
- # datomic (72)
- # emacs (2)
- # events (3)
- # flambo (1)
- # hoplon (88)
- # jobs (6)
- # juxt (51)
- # lein-figwheel (1)
- # leiningen (3)
- # lumo (12)
- # mount (4)
- # off-topic (3)
- # onyx (3)
- # pedestal (4)
- # portkey (27)
- # re-frame (13)
- # reagent (1)
- # ring (4)
- # rum (2)
- # uncomplicate (1)
- # unrepl (3)
For anyone running an uberjar on an ec2 instance, behind AWS ELB, do you still put nginx in front of the app? Having a strange issue with infinite 301 redirect when trying it with ring-ssl, so thought that having nginx do the redirect might be better. It's an extra hop, but might be useful for other things i'm not aware of yet.
@stvnmllr2 i used to put nginx in front, but then i realised - there is no point
but i use the ELB to do the ssl termination
i don't - the only port i have open is 443 - this is an API - all the html/js/css is static/SPA and served from s3/cloudfront, and cloudfront does the http->https redirect for free
@mccraigmccraig That sounds fun. I guess i could do that as well. Just more learning of aws first 🙂
oh, one final detail - we are using classic ELB, because history, and to get websockets to work we use ELB as a TCP proxy rather than an HTTP proxy... i think the newer ELB version says it will proxy websockets ok, but i haven't tried it
cloudfront is pretty straightforward - it will proxy different paths to origins like S3 or your API as you configure, you can terminate ssl with it, do http->https redirect, and set caching policies for your different origins
guessing there is no lein task to bundle up static resources for me? To upload to s3
that's on my todo - i was looking at - https://github.com/martinklepsch/s3-beam , 'cos we use boot for building cljs stuff
hmm. that's not what i was meaning to post
ah, it was this - https://github.com/martinklepsch/boot-s3
but that refs https://github.com/kanej/lein-s3-sync so you may be in luck
and what do you use to gather the static resources together? Might be obvious, but it's all new to me
our boot build compiles cljs, less and gathers all resources into an output dir
i started with https://github.com/martinklepsch/tenzing and iterated from there
@stvnmllr2 for SPA deployments, I just put everything inside a single directory (using things like the cljsbuild
‘s :output-to
) then aws s3 sync
like @bja mentioned. The end result was pretty clean and integrates well with my CI (I use CircleCI for instance)
Thanks @andrewhr, Still not sure i'll end up down the s3 road, but I'll definitely look into it. Doubt it'd be that hard to put the output together manually even, but thought I'd ask.
I also use aws s3 sync
. I was using lein-essthree
for a while, which is nice because it also handles the "put your shared libraries onto S3" bit of Clojure development, but it seems to be abandonware so we're moving off of it