Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Dockerfile to build (lein uberimage is flakey) #12

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7
1.8
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM clojure:lein-2.8.1-alpine
COPY . /usr/src/app
WORKDIR /usr/src/app/target
CMD ["java", "-jar", "uberjar.jar"]
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It allows developers to code without being connected to the net.
<br/>
[![Clojars Project](http://clojars.org/com.unbounce/yopa/latest-version.svg)](http://clojars.org/com.unbounce/yopa)

Also available as a [Docker image](https://registry.hub.docker.com/u/unbounce/yopa/).
Also available as a [Docker image](https://hub.docker.com/r/unbounce/yopa/).

# Features

Expand Down Expand Up @@ -60,11 +60,10 @@ Run with the example config:

Run the following:

lein clean
mvn -f fake-s3-pom.xml clean initialize
lein uberimage -t unbounce/yopa:latest
sudo docker push unbounce/yopa:latest

lein uberjar
docker build -t unbounce/yopa:latest
docker push unbounce/yopa:latest

## Usage

Expand Down
41 changes: 19 additions & 22 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(def project-version "1.0.0-SNAPSHOT")
(def build-meta (str "YOPA " project-version " - built on: " (java.util.Date.)))
(def ring-version "1.3.2")
(def aws-sdk-version "1.10.5.1")
(def aws-sdk-version "1.11.321")

(defproject com.unbounce/yopa project-version
:description "YOPA is Your Own Personal Aws"
Expand All @@ -12,55 +12,52 @@

:main com.unbounce.yopa.core
:aot [com.unbounce.yopa.core]
:jvm-opts ["-XX:MaxPermSize=256m"]

:uberjar-merge-with {#"\.conf$" [slurp str spit]}

:uberjar-name "uberjar.jar"

:manifest {"Implementation-Version" ~build-meta}

:resource-paths ["resources" "rubygems"]

:profiles {:dev {:plugins [[lein-kibit "0.0.8"]
[jonase/eastwood "0.2.1"]]}}
:profiles {:dev {:plugins [[lein-kibit "0.1.6"]
[jonase/eastwood "0.2.5"]]}}

;; wrong-arity conflicts with amazonica :(
:eastwood {:exclude-linters [:wrong-arity]}

:dependencies
[
[org.clojure/clojure "1.7.0"]
[org.clojure/clojure "1.8.0"]
[org.clojure/data.xml "0.0.8"]
[org.clojure/data.json "0.2.6"]
[org.clojure/tools.cli "0.3.1"]
[org.clojure/tools.cli "0.3.7"]
[base64-clj "0.1.1"]

[org.clojure/tools.logging "0.3.1"]
[org.slf4j/slf4j-log4j12 "1.7.12"]
[org.clojure/tools.logging "0.4.0"]
[org.slf4j/slf4j-log4j12 "1.7.25"]

[circleci/clj-yaml "0.5.3"]
[circleci/clj-yaml "0.5.6"]
[de.ubercode.clostache/clostache "1.4.0"]

[org.elasticmq/elasticmq-rest-sqs_2.11 "0.8.8" :exclusions [joda-time]]
[amazonica "0.3.29" :exclusions [com.amazonaws/aws-java-sdk]]
[org.elasticmq/elasticmq-rest-sqs_2.11 "0.13.9" :exclusions [joda-time]]
[amazonica "0.3.123" :exclusions [com.amazonaws/aws-java-sdk]]
[com.amazonaws/aws-java-sdk-sqs ~aws-sdk-version :exclusions [joda-time]]
[com.amazonaws/aws-java-sdk-sns ~aws-sdk-version :exclusions [joda-time]]
[com.amazonaws/aws-java-sdk-s3 ~aws-sdk-version :exclusions [joda-time]]
;; Amazonica has a weird dependency on cloudsearch and lambda
[com.amazonaws/aws-java-sdk-cloudsearch ~aws-sdk-version :exclusions [joda-time]]
[com.amazonaws/aws-java-sdk-lambda ~aws-sdk-version :exclusions [joda-time]]

[clj-http "2.0.0" :exclusions [commons-logging
[clj-http "3.9.0" :exclusions [commons-logging
cheshire
org.apache.httpcomponents/httpclient]]
[cheshire "5.5.0"]
[cheshire "5.8.0"]
[ring/ring-core ~ring-version]
[ring/ring-jetty-adapter ~ring-version]

[org.jruby/jruby "9.0.0.0" :exclusions [com.github.jnr/jffi
[org.jruby/jruby "9.1.17.0" :exclusions [com.github.jnr/jffi
com.github.jnr/jnr-x86asm
joda-time]]
]

:repositories
[
["softwaremill-releases" "https://nexus.softwaremill.com/content/repositories/releases"]
["spray-releases" "http://repo.spray.io"]
]
)
])
Loading