Bläddra i källkod

added start-docker script and deployment instructions

Brandon Wong 1 år sedan
förälder
incheckning
652f4b549d
3 ändrade filer med 20 tillägg och 0 borttagningar
  1. 10 0
      README.md
  2. 1 0
      src/attendant/main.clj
  3. 9 0
      start-docker.sh

+ 10 - 0
README.md

@@ -0,0 +1,10 @@
+
+# Attendant
+
+### To Build and Deploy
+
+Run `clojure -T:build uber`, which will run the :build alias tool (from deps.edn) and call the "uber" function in build.clj. Look for the finished product in the target directory.
+
+Then copy the standalone jar file to the server, make sure there is the appropriate "files" folder, make sure the jar version number matches the one in the docker script, and run the docker script.
+
+

+ 1 - 0
src/attendant/main.clj

@@ -15,6 +15,7 @@
 (defn main-system [& {:keys [dev]}]
   (component/system-map
    :server (server/map->Server {:port port
+                                :dir "./files"
                                 :dev dev})
    :nrepl (nrepl/map->NreplServer {:port nrepl-port})))
 

+ 9 - 0
start-docker.sh

@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+# the app runs on port 2424
+# the nrepl runs on port 7288
+
+echo 'docker run -d --name attendant -v /home/ubuntu/attendant:/app -w /app -p 2526:2424 -p 2527:7288 ibmjava:jre java -jar /app/attendant-0.0.1-standalone.jar'
+
+docker run -d --name attendant -v /home/ubuntu/attendant:/app -w /app -p 2526:2424 -p 2527:7288 ibmjava:jre java -jar /app/attendant-0.0.1-standalone.jar
+