git.s-ol.nu redirectly / 2ca1b0c
deployability s-ol 5 months ago
5 changed file(s) with 44 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1 /target
2 /classes
3 /checkouts
4 profiles.clj
5 pom.xml
6 pom.xml.asc
7 *.jar
8 *.class
9 /.lein-*
10 /.nrepl-port
11 Dockerfile
1 .lein-repl-history
2 target
1 /target
2 /classes
3 /checkouts
4 profiles.clj
5 pom.xml
6 pom.xml.asc
7 *.jar
8 *.class
9 /.lein-*
10 /.nrepl-port
1 FROM java:8-alpine AS build-env
2 ADD https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein /bin/lein
3 RUN apk update && apk add bash openssl
4 RUN /bin/chmod +x /bin/lein && lein
5 COPY . /build
6 RUN cd /build && lein uberjar
7
8 FROM java:8-alpine
9 RUN mkdir -p /app/config
10 COPY --from=build-env /build/target/redirectly-*-standalone.jar /app/redirectly-standalone.jar
11 CMD java -cp /app/config:/app/redirectly-standalone.jar redirectly.deploy
12 EXPOSE 3000
77 :dependencies [[org.clojure/clojure "1.10.0"]
88 [sonian/carica "1.2.2"]
99 [ring/ring-core "1.7.1"]
10 [ring/ring-jetty-adapter "1.7.1"]
11 [ring-logger "1.0.1"]])
10 [ring/ring-jetty-adapter "1.7.1"]]
11 :main redirectly.deploy
12 :profiles {:uberjar {:aot :all}})
13 ; :jar-exclusions [#"^config\.edn$"])
1 (ns redirectly.deploy
2 (:gen-class)
3 (:require [ring.adapter.jetty :refer [run-jetty]]
4 [redirectly.core :refer [handler]]))
5
6 (defn -main [& args]
7 (run-jetty handler {:port 3000}))