This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-08
Channels
- # announcements (11)
- # babashka (13)
- # beginners (11)
- # biff (2)
- # calva (17)
- # cider (19)
- # clojure (60)
- # clojure-berlin (1)
- # clojure-dev (20)
- # clojure-europe (48)
- # clojure-nl (1)
- # clojure-norway (98)
- # clojure-spec (7)
- # clojure-uk (5)
- # core-typed (32)
- # cursive (13)
- # datomic (12)
- # dev-tooling (5)
- # emacs (7)
- # figwheel-main (2)
- # graalvm (4)
- # hyperfiddle (4)
- # introduce-yourself (1)
- # malli (14)
- # missionary (32)
- # off-topic (7)
- # overtone (4)
- # pedestal (10)
- # proletarian (4)
- # re-frame (8)
- # releases (11)
- # tools-build (1)
- # tools-deps (4)
- # xtdb (38)
Hi all, I tried to deploy my first Biff app today, using a Docker container (bridged network). But the app would not listen on port 8080 (connection refused), even though the port was correctly mapped and the app start up successfully. As it turned out, the reason was that Jetty was only listening locally on localhost:8080, but not on any external interface. I quickly updated the config.edn to:
:biff/host #profile {:dev "0.0.0.0"
:prod "0.0.0.0"
:default "0.0.0.0"}
And now it works….Yes, by default it listens on localhost in prod because if you're deploying to a server provisioned with the provided server-setup.sh
script, nginx will forward requests to localhost:8080
.
However, that is definitely a pothole for anyone deploying via containers. I'll probably merge this into master, which makes the Dockerfile set the host to 0.0.0.0: https://github.com/jacobobryant/biff/commit/d095ac9c59214feff1c747e645831cb792f07c11