Fork me on GitHub
#untangled
<
2016-12-30
>
tony.kay01:12:18

um. I deployed something to heroku

tony.kay01:12:27

but not with a Datomic back-end

tony.kay01:12:52

oh...I think it was an in-memory datomic instance

tony.kay01:12:20

the main thing was setting PORT via the environment, which untangled-server supports if you put a special marker in the config file

tony.kay01:12:52

something like: { :server { :port :env/PORT }}

fragamus01:12:04

cool... I have been steadily getting there, but that will help

tony.kay01:12:34

I don't remember the exact syntax, but you can try it out locally with PORT=9000 java -jar app.jar and see

tony.kay01:12:00

you'll need to embed the config file in your app resources (so it ends up in the jar)

tony.kay01:12:23

and there is a command line option for setting the config file in untangled server...`-configFile` or something

tony.kay01:12:38

a relative path to the file will go against classpath

tony.kay01:12:12

so use jar tf app.jar to see where the file is, and just use that relative path

tony.kay01:12:53

@fragamus java -Dconfig=config/production.edn -jar app.jar (assuming you have config/production.edn in the jar file)

tony.kay01:12:26

and {:server {:port :env.edn/PORT}} as the content

tony.kay01:12:12

the :env/PORT will return it as a string. The EDN version reads the string using read-string, so you can embed true clj data in an env variable

tony.kay01:12:24

Feel free to write up a devcard appendix for the devguide "Deploying to Heroku" 😉