Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/droidion/opus-classical-clojure
Catalogue for streaming classical music
https://github.com/droidion/opus-classical-clojure
Last synced: 21 days ago
JSON representation
Catalogue for streaming classical music
- Host: GitHub
- URL: https://github.com/droidion/opus-classical-clojure
- Owner: Droidion
- Created: 2024-11-07T13:44:09.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-08T09:22:16.000Z (3 months ago)
- Last Synced: 2025-01-01T13:26:28.393Z (22 days ago)
- Language: Clojure
- Homepage: https://clojure.opusclassical.net
- Size: 15.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Opus Classical Clojure
[![Clojure CI](https://github.com/Droidion/opus-classical-clojure/actions/workflows/cicd.yml/badge.svg)](https://github.com/Droidion/opus-classical-clojure/actions/workflows/cicd.yml)
Opus Classical now uses Clojure.
## Installation
Have Java installed.
Recommend using [SDKMan](https://sdkman.io/) to install Java.
Recommend using Java 23.
```sh
sdk install java 23.0.1-tem
```Have Clojure installed: https://clojure.org/guides/install_clojure
Install dependencies:
```sh
clojure -P
```For building client-side assets, have [Node.js](https://nodejs.org/en) and [pnpm](https://pnpm.io/) installed.
Install pnpm packages:
```sh
pnpm install
```## Run locally
Running locally will use ring with hot reloading.
Create git-ignored file `resources/config.edn` and add environment variable for db connection:
```clojure
{: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"]}
``````sh
clojure -M:ring
```In separate terminal, run:
```sh
pnpm dev
```## Check for outdated dependencies
Check for outdated clojure dependencies:
```sh
clojure -M:outdated
```Update clojure dependencies:
```sh
clojure -M:outdated --upgrade
```Check for outdated node dependencies:
```sh
pnpm outdated
```Update node dependencies:
```sh
pnpm update
```## Build and run for production
Build client assets:
```sh
pnpm build
```Build jar file:
```sh
clojure -T:build uber
```Run jar file:
```sh
$ java -jar target/opus-classical-clojure-0.1.0-standalone.jar
```## Tests
```sh
clojure -X:test
```## Deploy
I use [Dockploy](https://dockploy.com/) to deploy the app using github hooks.
Main configuration file is `docker-compose.yml`.