Opus Classical now uses Clojure.
Have Java installed.
Recommend using SDKMan to install Java.
Recommend using Java 23.
sdk install java 23.0.1-tem
Have Clojure installed: https://clojure.org/guides/install_clojure
Install dependencies:
clojure -P
For building client-side assets, have Node.js and pnpm installed.
Install pnpm packages:
pnpm install
Running locally will use ring with hot reloading.
Create git-ignored file resources/config.edn
and add environment variable for db connection:
{:db {:name #or [#env DB_NAME "opusclassical"]
:host #or [#env DB_HOST "neon.tech"]
:user #or [#env DB_USER "user"]
:password #or [#env DB_PASSWORD "password"]
:port #or [#env DB_PORT "5432"]}
:server {:port #or [#env PORT "3000"]}
:profile #or [#env ENVIRONMENT "dev"]}
clojure -M:ring
In separate terminal, run:
pnpm dev
Check for outdated clojure dependencies:
clojure -M:outdated
Update clojure dependencies:
clojure -M:outdated --upgrade
Check for outdated node dependencies:
pnpm outdated
Update node dependencies:
pnpm update
Build client assets:
pnpm build
Build jar file:
clojure -T:build uber
Run jar file:
$ java -jar target/opus-classical-clojure-0.1.0-standalone.jar
clojure -X:test
I use Dockploy to deploy the app using github hooks.
Main configuration file is docker-compose.yml
.