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
|
||||
|
||||
RUN apk add --no-cache libstdc++ sqlite
|
||||
RUN apk add --no-cache libstdc++ curl sqlite
|
||||
|
||||
RUN addgroup -S 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
|
||||
(:require
|
||||
[babashka.process :as process]
|
||||
[clojure.string :as str]
|
||||
[clojure.test :as test]
|
||||
[com.biffweb :as biff]
|
||||
[com.score-the-pigs.app :as app]
|
||||
|
|
@ -59,7 +61,12 @@
|
|||
(defn use-sqlite [ctx]
|
||||
(let [db-url (get ctx :example/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/migrate migration-config)
|
||||
|
|
|
|||
Loading…
Reference in a new issue