- Start repl server
clojure -M:repl:dev -m nrepl.cmdlineclojure -M:dev:repl -m galt.main
- Connect to the nREPL server
- from Vim:
:ConjureConnect - or connect via REPL command line client:
clojure -T:nrebel :port 7888
- Start the system by evaluating in REPL
(galt.main/start-system!)
- Open the page at http://localhost:8081
- (local) Build a uberjar
clj -T:build uber - (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
- 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
- (remote) Import geographical data (world.sql)
- source: https://github.com/dr5hn/countries-states-cities-database/tree/master/psql
- raw: https://github.com/dr5hn/countries-states-cities-database/raw/refs/heads/master/psql/world.sql
- it will be picked up by migration script
import-cities-countriesatGALT_CITIES_COUNTRIES_SQL_PATH
- (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
- (remote) Run the web server:
java -jar target/galt-0.1.1-standalone.jar