Add README and update migration code

main
Eric Ihli 4 years ago
parent ecb5298201
commit 3b2e79f0aa

@ -6,7 +6,7 @@
src = $(shell find web -type f -iname *.clj 2>/dev/null) src = $(shell find web -type f -iname *.clj 2>/dev/null)
LottoEmail.jar: $(src) darklimericks.jar: $(src)
cd web && clj -A:depstar -M:depstar -m hf.depstar.uberjar \ cd web && clj -A:depstar -M:depstar -m hf.depstar.uberjar \
darklimericks.jar -C -m com.darklimericks.server.core darklimericks.jar -C -m com.darklimericks.server.core

@ -0,0 +1,7 @@
#+TITLE: DarkLimericks
* Development
Requires [[https://github.com/tachyons-css/tachyons/][Tachyons CSS]]. There is a symlink in ~web/resources/public~ to the pre-built ~tachyons.css~ and ~tachyons.min.css~ found in the repo.
Build ~.jar~ with ~clojure -X:depstart uberjar :jar prhyme.jar~.

@ -4,8 +4,8 @@
This directory contains necessities for initializing and running a database This directory contains necessities for initializing and running a database
locally inside a docker container. locally inside a docker container.
We want our develpment environment to use the same tech stack that production We want our development environment to use the same tech stack that production
uses. So rather than suppord a development configuration that uses SQLite and a uses. So rather than support a development configuration that uses SQLite and a
production configuration that uses PostgreSQL, just use PostgreSQL for both. production configuration that uses PostgreSQL, just use PostgreSQL for both.
With Docker, it's easy. With Docker, it's easy.

@ -22,7 +22,7 @@
migratus {:mvn/version "1.3.2"} migratus {:mvn/version "1.3.2"}
ring/ring-core {:mvn/version "1.8.2"} ring/ring-core {:mvn/version "1.8.2"}
environ {:mvn/version "1.2.0"} environ {:mvn/version "1.2.0"}
prhyme {:local/root "/home/eihli/code/prhyme/prhyme.jar"}} prhyme {:local/root "/home/eihli/src/prhyme"}}
:paths ["src" "resources"] :paths ["src" "resources"]
:aliases {:dev {:extra-paths ["dev"] :aliases {:dev {:extra-paths ["dev"]
:extra-deps {hawk {:mvn/version "0.2.11"} :extra-deps {hawk {:mvn/version "0.2.11"}

@ -5,10 +5,17 @@
(def config {:store :database (def config {:store :database
:migration-dir "migrations/" :migration-dir "migrations/"
:init-script "init.sql" :init-script "init.sql"
:db {:connection-uri (-> state/config :database.sql/connection :jdbcUrl)}}) :db {:connection-uri (:jdbcUrl (-> state/config :com.darklimericks.db.core/connection))}})
(comment (comment
config
(migratus/init config)
(migratus/migrate config) (migratus/migrate config)
(migratus/create config "User Limericks") (migratus/create config "User Limericks")
state/config state/config
(:database.sql/connection state/system) (:database.sql/connection state/system)

Loading…
Cancel
Save