untangled

NEW CHANNEL: #fulcro
tony.kay 2016-12-30T01:11:18.001423Z

um. I deployed something to heroku

tony.kay 2016-12-30T01:11:27.001424Z

but not with a Datomic back-end

tony.kay 2016-12-30T01:11:52.001425Z

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

tony.kay 2016-12-30T01:12:20.001426Z

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

tony.kay 2016-12-30T01:12:24.001427Z

@fragamus ^^^

tony.kay 2016-12-30T01:12:52.001428Z

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

fragamus 2016-12-30T01:13:04.001429Z

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

tony.kay 2016-12-30T01:13:34.001430Z

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

fragamus 2016-12-30T01:13:47.001431Z

niiice

tony.kay 2016-12-30T01:14:00.001432Z

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

tony.kay 2016-12-30T01:14:23.001433Z

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

tony.kay 2016-12-30T01:14:38.001434Z

a relative path to the file will go against classpath

tony.kay 2016-12-30T01:15:12.001435Z

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

tony.kay 2016-12-30T01:39:53.001436Z

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

tony.kay 2016-12-30T01:40:26.001437Z

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

tony.kay 2016-12-30T01:41:12.001439Z

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.kay 2016-12-30T01:43:24.001442Z

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