-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
411 additions
and
1,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout git repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install clojure tools | ||
uses: DeLaGuardo/[email protected] | ||
with: | ||
cli: 1.11.1.1189 | ||
|
||
- name: Run tests | ||
run: clojure -X:test | ||
|
||
- name: Build uberjar | ||
run: clojure -T:build uber | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: target/*.jar | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
with: | ||
name: kongeor/evolduo-app | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
tag_names: true | ||
platforms: linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
FROM adoptopenjdk/openjdk12:x86_64-alpine-jdk-12.0.2_10-slim | ||
FROM eclipse-temurin:22-jdk | ||
|
||
COPY target/kino.jar /kino/app.jar | ||
COPY target/kino* /kino/app.jar | ||
|
||
CMD ["java", "-jar", "/kino/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
(ns build | ||
(:require [clojure.string :as str] | ||
[clojure.tools.build.api :as b])) | ||
|
||
|
||
(def lib 'kino) | ||
(def version (format "0.1.%s" (b/git-count-revs nil))) | ||
(def class-dir "target/classes") | ||
(def config-example (str class-dir "/config.edn.example")) | ||
(def basis (b/create-basis {:project "deps.edn"})) | ||
(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version)) | ||
|
||
(defn clean [_] | ||
(b/delete {:path "target"})) | ||
|
||
(defn config-string [] | ||
(str/replace (slurp config-example) | ||
#":version \"dev\"" (str ":version \"" version "\""))) | ||
|
||
(defn print-version [_] | ||
(println version)) | ||
|
||
(defn uber [_] | ||
(clean nil) | ||
(b/copy-dir {:src-dirs ["src" "resources"] | ||
:target-dir class-dir}) | ||
(b/write-file {:path (str class-dir "/config.edn") | ||
:string (config-string)}) | ||
(b/compile-clj {:basis basis | ||
:src-dirs ["src"] | ||
:class-dir class-dir}) | ||
(b/uber {:class-dir class-dir | ||
:uber-file uber-file | ||
:basis basis | ||
:main 'kion.system})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{:paths ["src" "resources"] | ||
:deps | ||
{org.clojure/clojure {:mvn/version "1.12.0-beta1"} | ||
integrant/integrant {:mvn/version "0.8.1"} | ||
compojure/compojure {:mvn/version "1.7.1"} | ||
cprop/cprop {:mvn/version "0.1.19"} | ||
|
||
ring/ring-core {:mvn/version "1.11.0"}, | ||
ring/ring-jetty-adapter {:mvn/version "1.11.0"} | ||
ring/ring-defaults {:mvn/version "0.4.0"} | ||
|
||
dev.weavejester/ragtime {:mvn/version "0.9.3"} | ||
com.github.seancorfield/honeysql {:mvn/version "2.5.1103"} | ||
com.github.seancorfield/next.jdbc {:mvn/version "1.3.909"} | ||
org.postgresql/postgresql {:mvn/version "42.7.1"} | ||
|
||
;; TODO | ||
com.mchange/c3p0 {:mvn/version "0.9.5.5"} | ||
|
||
clj-spotify/clj-spotify {:mvn/version "0.1.9"} | ||
|
||
hiccup/hiccup {:mvn/version "1.0.5"} | ||
|
||
org.clj-commons/humanize {:mvn/version "1.0"} | ||
org.clojure/data.json {:mvn/version "2.5.0"} | ||
|
||
org.slf4j/slf4j-simple {:mvn/version "2.0.11"} | ||
|
||
http-kit/http-kit {:mvn/version "2.8.0"} | ||
|
||
jarohen/chime {:mvn/version "0.3.3"} | ||
com.taoensso/timbre {:mvn/version "6.3.1"} | ||
} | ||
:aliases | ||
{:dev {:extra-paths ["dev"] | ||
:extra-deps {integrant/repl {:mvn/version "0.3.3"}}} | ||
:server {:main-opts ["-m" "kino.system"]} | ||
:build {:deps {io.github.clojure/tools.build {:git/tag "v0.9.6" :git/sha "8e78bcc"}} | ||
:ns-default build} | ||
:test {:extra-paths ["test"] | ||
:extra-deps {io.github.cognitect-labs/test-runner | ||
{:git/tag "v0.5.1" :git/sha "dfb30dd"}} | ||
:main-opts ["-m" "cognitect.test-runner"] | ||
:exec-fn cognitect.test-runner.api/test}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
services: | ||
database: | ||
image: 'postgres:15.7' | ||
container_name: kino_db | ||
|
||
ports: | ||
- 5432:5432 | ||
|
||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
|
||
volumes: | ||
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CREATE DATABASE kino; | ||
CREATE USER kino WITH PASSWORD 'kino'; | ||
ALTER DATABASE kino owner to kino; | ||
ALTER ROLE kino SET client_encoding TO 'utf8'; | ||
ALTER ROLE kino SET timezone TO 'UTC'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.