    (uber)
    (jar)
    (target)))
+
+(deftask aws
+  "Call out to AWS"
+  []
+  (dosh "aws" "help"))
+
+(def environment-name (str project "-prod"))
+(def aws-region "eu-west-1")
+(def aws-account-id "247806367507")
+(def zipfile (format "edge-aws-ebs-upload-%s.zip" version))
+
+(deftask create-application
+  "Create AWS Beanstalk application and environment, only call this once."
+  []
+  (println "Creating application:" project)
+  (dosh "aws" "elasticbeanstalk" "create-application"
+        "--application-name" project)
+  (println "Creating environment:" project environment-name)
+  (dosh "aws" "elasticbeanstalk" "create-environment"
+        "--application-name" project
+        "--environment-name" environment-name
+        "--cname-prefix" environment-name
+        "--solution-stack-name" "64bit Amazon Linux 2016.03 v2.1.6 running Docker 1.11.2"))
+
+(deftask docker "Create a zip" []
+  (with-pre-wrap fileset
+    (dosh "zip"
+          (str "target/" zipfile)
+          "Dockerfile"
+          (str "target/" project "-" version "-standalone.jar"))
+    fileset))
+
+(deftask deploy "Deploy application to beanstalk environment" []
+  (comp
+   (println "Building zip file:" zipfile)
+   (dosh "zip"
+          (str "target/" zipfile)
+          "Dockerfile"
+          (str "target/" project "-" version "-standalone.jar"))
+   (println "Uploading zip file to S3:" zipfile)
+   (dosh "aws" "s3" "cp" (str "target/" zipfile)
+         (format "s3://elasticbeanstalk-%s-%s/%s" aws-region aws-account-id zipfile))
+   (println "Creating application version:" version)
+   (dosh "aws" "elasticbeanstalk" "create-application-version"
+         "--application-name" project
+         "--version-label" version
+         "--source-bundle" (format "S3Bucket=elasticbeanstalk-%s-%s,S3Key=%s" aws-region aws-account-id zipfile))
+   (println "Updating environment:" environment-name "->" version)
+   (dosh "aws" "elasticbeanstalk" "update-environment"
+         "--application-name" project
+         "--environment-name" environment-name
+         "--version-label" version)
+   (println "Done")
+   identity))
+
+(deftask show-version "Show version" [] (println version))

;; (e.g. CIDER).

;; See README.md for more details.

(set-env!
 :source-paths #{"sass" "src"}

   [org.clojure/tools.namespace "0.2.11"]
   [prismatic/schema "1.0.4"]
   [selmer "1.0.4"]
   [yada "1.1.35" :exclusions [aleph manifold ring-swagger prismatic/schema]]

   [aleph "0.4.2-alpha8"]
   [manifold "0.1.6-alpha1"]
