Skip to content

Latest commit

 

History

History
32 lines (28 loc) · 1.57 KB

File metadata and controls

32 lines (28 loc) · 1.57 KB

Development

  1. Start repl server
  • clojure -M:repl:dev -m nrepl.cmdline
  • clojure -M:dev:repl -m galt.main
  1. Connect to the nREPL server
  • from Vim: :ConjureConnect
  • or connect via REPL command line client: clojure -T:nrebel :port 7888
  1. Start the system by evaluating in REPL
  • (galt.main/start-system!)
  1. Open the page at http://localhost:8081

Release & deployment

  1. (local) Build a uberjar clj -T:build uber
  2. (local) Copy it to the destination server: scp target/galt-0.1.1-standalone.jar galt.is:~/www/galt.is
  • also copy config files: scp -r config galt.is:~/galt.is
  1. Remote env setup
  • create a database user: CREATE ROLE galt WITH PASSWORD 'galtpass' SUPERUSER CREATEDB INHERIT LOGIN;
    • superuser is needed for some DB migrations that add extensions (e.g. cube, earthdistance)
  • env variables needed: MIGRATUS_DATABASE, MIGRATUS_USER, MIGRATUS_PASSWORD
  • export env variables: set -a && source .env && set +a
  1. (remote) Import geographical data (world.sql)
  1. (remote) Run the database migrations
  • just the first time: java -jar galt-0.1.1-standalone.jar init
  • every time (when database changes) java -jar galt-0.1.1-standalone.jar migrate
  1. (remote) Run the web server: java -jar target/galt-0.1.1-standalone.jar