Right now you'd either have to create a custom buildpack, which would 
effectively be the Clojure buildpack[1] minus these few lines of code[2]. 
Then you'd add a line to remove all the source code and anything that isn't 
your uberjar from the slug.

I'd be willing to add an option to the lein-heroku plugin that deploys an 
uberjar without the JDK (I'm the creator). If you'd like that, can you open 
an issue on Github[3]? Thanks.

[1] https://github.com/heroku/heroku-buildpack-clojure
[2] 
https://github.com/heroku/heroku-buildpack-clojure/blob/master/bin/compile#L28-L40
[3] https://github.com/heroku/lein-heroku/issues

On Wednesday, October 7, 2015 at 2:17:43 AM UTC-5, Robin Heggelund Hansen 
wrote:
>
> I'm just trying to optimize, so it isn't vital to my app.
> How do I use the builtin openjdk 7? My app makes no use of Java 8 anyway.
>
> onsdag 7. oktober 2015 03.56.26 UTC+2 skrev Joe Kutner følgende:
>>
>> The slug will also include the JDK, which is ~50mb compressed. It is 
>> possible to exclude the JDK and use the cedar-14 stack's JVM, which is 
>> currently openjdk7 because that's what Canonical supports. But then you 
>> don't get the all the goodness of Java 8, which is probably better for your 
>> app than a little boost to started up time.
>>
>> Are you having problems with boot timeouts, or just trying to optimize? 
>>
>> On Tuesday, October 6, 2015 at 6:54:08 AM UTC-5, Robin Heggelund Hansen 
>> wrote:
>>>
>>> A low heroku slug size is good for improving startup of heroku 
>>> applications. Because of that I've spent some time lately trying to get as 
>>> small a slug size as possible. I eventually found a plugin called 
>>> lein-heroku, which allows you to just upload a single uberjar file. When 
>>> the build system is set up correctly, this should give you the tiniest slug 
>>> size possible. Yet, even though I have 20ish MB less in the repository 
>>> (checked with heroku run bash && du -h), the difference in slug size is a 
>>> mere 3MB.
>>>
>>> I'm consistently getting around 70-80MB in slug size. Is this as low as 
>>> I can go? Have anyone else done better?
>>>
>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to