Fork me on GitHub
#luminus
<
2017-10-25
>
Charleshd13:10:53

I'm trying luminus template witth +boot

Charleshd13:10:32

but boot figwheel doesn't reload changes when I change a cljs file

Charleshd13:10:40

dunno if i'm using it well

Said14:10:44

Hi here.

Said14:10:24

I have a dev-environment made with docker-compose. I'm using the official clojure image, with the next Dockerfile:

Said14:10:46

and my luminus project service have the following configuration.

Said14:10:53

For some reason, each time I try to connect luminus.repl-server, from my host machine, i get the following error:

Said14:10:19

> lein repl :connect localhost:7000
Connecting to nREPL at localhost:7000
SocketException The transport's socket appears to have lost its connection to the nREPL server
	clojure.tools.nrepl.transport/bencode/fn--10199/fn--10200 (transport.clj:95)
	clojure.tools.nrepl.transport/bencode/fn--10199 (transport.clj:95)
	clojure.tools.nrepl.transport/fn-transport/fn--10171 (transport.clj:42)
	clojure.core/binding-conveyor-fn/fn--4676 (core.clj:1938)
	java.util.concurrent.FutureTask.run (FutureTask.java:266)
	java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
	java.lang.Thread.run (Thread.java:748)

Said15:10:15

I compared my Dockerfile with Luminus Dockerfile, and I can't see a difference about exposing my ports.

Said15:10:31

But If I execute docker-composse exec app lein repl :connect localhost:7000, it will work.

Said15:10:50

Ok, I found the solution.

Said15:10:26

The problem was I forget to set bind to 0.0.0.0.

Said15:10:09

(mount/defstate ^{:on-reload :noop}
                repl-server
                :start
                (when-let [nrepl-port (env :nrepl-port)]
                  (repl/start {:port nrepl-port
                               :bind "0.0.0.0"})) <-- I forget this key/value
                :stop
                (when repl-server
                  (repl/stop repl-server)))

Said15:10:10

After this, I can connect to luminus repl with lein repl :connect 0.0.0.0:7000 from host machine