graphql

Prometheus 2020-04-07T14:27:21.024300Z

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

Prometheus 2020-04-07T14:27:30.024700Z

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

Prometheus 2020-04-07T14:28:12.025200Z

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

Prometheus 2020-04-07T14:28:55.025800Z

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

Prometheus 2020-04-07T14:29:23.026200Z

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

gklijs 2020-04-07T16:10:30.026300Z

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")

Prometheus 2020-04-07T16:10:46.026500Z

Thank you will do

gklijs 2020-04-07T16:11:58.026800Z

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

Prometheus 2020-04-07T16:13:49.027Z

Thank you! it worked

gklijs 2020-04-07T16:16:24.027200Z

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

Prometheus 2020-04-07T16:17:22.027400Z

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