This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-15
Channels
- # adventofcode (39)
- # aws (1)
- # beginners (39)
- # boot (1)
- # calva (79)
- # cider (8)
- # cljdoc (13)
- # cljs-dev (45)
- # clojure (89)
- # clojure-berlin (2)
- # clojure-europe (1)
- # clojure-uk (1)
- # clojurescript (7)
- # datomic (1)
- # emacs (6)
- # figwheel-main (2)
- # fulcro (29)
- # hyperfiddle (21)
- # juxt (1)
- # leiningen (1)
- # lumo (3)
- # music (1)
- # off-topic (20)
- # pedestal (23)
- # portkey (3)
- # reagent (2)
- # rum (1)
- # shadow-cljs (27)
- # vim (5)
Hello, just starting with pedestal. I have the hello-world example. When I use from my terminal lein run-dev
I get the expected answer. I have added a Dockerfile
and a docker-compose.yml
running the same command. The jetty server starts inside the container, but I get a connection was reset
when navigating to the correct port. I'm using (constantly true)
for :allowed-origins
. Does anyone know what I am missing?
@yefoakira Can you share your Dockerfile and docker-compose.yml here?
Sure Dockerfile:
FROM clojure:lein
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY project.clj /usr/src/app
RUN lein deps
EXPOSE 8080
docker-compose.yml
version: '3'
services:
web:
build: .
ports:
- "4001:8080"
volumes:
- .:/usr/src/app
command: lein run-dev
I see that your Dockerfile copies the project.clj into the container, but I don't see how your application source gets copied.
last lines are:
web_1 | 22:11:32.242 [main] INFO org.eclipse.jetty.server.Server - Started @2471ms
web_1 | 22:11:32.242 [qtp1315795813-24] DEBUG org.eclipse.jetty.util.thread.QueuedThreadPool - run acceptor-1@408a247c
web_1 | 22:11:32.242 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED @2471ms org.eclipse.jetty.server.Server@7c0da600[9.4.10.v20180503]
And nothing comes out when I go the url location.URL being something like http://localhost:4001/ ?
I'm on Windows with WSL rather than Linux, so there's bound to be a little variation.