Fork me on GitHub
#graphql
<
2020-04-07
>
Prometheus14:04:21

Hey I’m having trouble deploying my application to Docker. I’m suspecting some code I’ve written

Prometheus14:04:30

(defn load-schema
  []
  (-> (io/resource "schema.edn")
      slurp
      edn/read-string
      (util/attach-resolvers (resolver-map))
      schema/compile))
```

Prometheus14:04:12

Compiling si-be.handler
Syntax error compiling deftype* at (flatland/ordered/set.clj:19:1).
Exception in thread "main" Syntax error compiling deftype* at (flatland/ordered/set.clj:19:1). 
This is the error I’m getting

Prometheus14:04:55

FROM clojure
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY project.clj /usr/src/app
RUN mkdir -p /usr/src/app/resources
COPY resources/schema.edn /usr/src/app/resources
RUN lein deps
COPY . /usr/src/app
RUN mv "$(lein with-profile prod uberjar | sed -n 's/^Created \(.*standalone\.jar\)/\1/p')" app-standalone.jar
EXPOSE 8080
CMD java -jar app-standalone.jar
Dockerfile
#!/bin/sh

docker kill si-be-container
docker rm si-be-container
docker build -t si-be ~/Developer/spesielt-interessert/si-be
docker run -p 8080:8080 --name si-be-container -d  si-be
Deploy script

Prometheus14:04:23

I’m using Lacinia, so I thought it be relevant to post it here

gklijs16:04:30

Latest version has a problem with aot compiling. You could try if it works with 0.12.0 or lacinia-pedestal (or com.walmartlabs/lacinia "0.33.0")

Prometheus16:04:46

Thank you will do

gklijs16:04:58

Didn't had time/urgency to dive into it, @U04VDKC4G had some ideas.

Prometheus16:04:49

Thank you! it worked

gklijs16:04:24

If you have the time it would be great if it could be fixed. 😉

Prometheus16:04:22

I’m sure I would do more damage than good, but looking forward to contributing more, when I learn the library properly 🙂