ok...
This commit is contained in:
parent
1f6111c632
commit
394e2f9b51
3 changed files with 10 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ RUN clojure -T:build uberjar
|
||||||
|
|
||||||
FROM eclipse-temurin:21-alpine
|
FROM eclipse-temurin:21-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache libstdc++ sqlite
|
RUN apk add --no-cache libstdc++ curl sqlite
|
||||||
|
|
||||||
RUN addgroup -S atlantico-software && \
|
RUN addgroup -S atlantico-software && \
|
||||||
adduser -S atlantico-software -G atlantico-software
|
adduser -S atlantico-software -G atlantico-software
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
PRAGMA journal_mode=WAL;
|
SELECT 1;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
(ns com.score-the-pigs
|
(ns com.score-the-pigs
|
||||||
(:require
|
(:require
|
||||||
|
[babashka.process :as process]
|
||||||
|
[clojure.string :as str]
|
||||||
[clojure.test :as test]
|
[clojure.test :as test]
|
||||||
[com.biffweb :as biff]
|
[com.biffweb :as biff]
|
||||||
[com.score-the-pigs.app :as app]
|
[com.score-the-pigs.app :as app]
|
||||||
|
|
@ -59,7 +61,12 @@
|
||||||
(defn use-sqlite [ctx]
|
(defn use-sqlite [ctx]
|
||||||
(let [db-url (get ctx :example/db-url)
|
(let [db-url (get ctx :example/db-url)
|
||||||
ds (jdbc/get-datasource db-url)
|
ds (jdbc/get-datasource db-url)
|
||||||
migration-config (ctx->migratus-config ctx)]
|
migration-config (ctx->migratus-config ctx)
|
||||||
|
db-loc (-> db-url
|
||||||
|
(str/split #":")
|
||||||
|
last)]
|
||||||
|
|
||||||
|
(process/shell (str "sqlite3" db-loc "'PRAGMA journal_mode=WAL;'"))
|
||||||
|
|
||||||
(migratus/init migration-config)
|
(migratus/init migration-config)
|
||||||
(migratus/migrate migration-config)
|
(migratus/migrate migration-config)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue