From 39cd50828706a86302b606025ccefa9a2426f722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinb=C3=B6lting?= Date: Tue, 2 Jul 2024 13:42:03 +0200 Subject: [PATCH 1/4] chore: Add sqlite to localdev setup --- .gitignore | 2 ++ docker-compose.yml | 5 +++-- sipi/db/.gitkeep | 0 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 sipi/db/.gitkeep diff --git a/.gitignore b/.gitignore index 3962f10233..8ad2b8c78d 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,7 @@ sipi/tmp-dsp-ingest/ dependencies.txt /sipi/images/* +/sipi/db/* .idea/ .metals/ @@ -58,3 +59,4 @@ docs/03-endpoints/generated-openapi/* # exclude test reports generated by xunit-viewer /index.html + diff --git a/docker-compose.yml b/docker-compose.yml index 444ff451be..51b6c3d482 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ services: - app: image: daschswiss/dsp-app:v11.11.0 ports: @@ -69,6 +68,7 @@ services: volumes: - ./sipi/images:/opt/images:delegated - ./sipi/tmp-dsp-ingest:/opt/temp:delegated + - ./sipi/db/:/opt/db:delegated networks: - knora-net environment: @@ -82,7 +82,8 @@ services: - JWT_SECRET=UP 4888, nice 4-8-4 steam engine - SIPI_USE_LOCAL_DEV=false - ALLOW_ERASE_PROJECTS=true -# - JWT_DISABLE_AUTH=true # Uncomment this line if you want to disable authentication for the ingest service + - DB_JDBC_URL=jdbc:sqlite:/opt/db/ingest.sqlite + # - JWT_DISABLE_AUTH=true # Uncomment this line if you want to disable authentication for the ingest service deploy: resources: limits: diff --git a/sipi/db/.gitkeep b/sipi/db/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 From 063a125fa64f2339a986ab29017ed6ef725c2ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinb=C3=B6lting?= Date: Tue, 2 Jul 2024 13:49:14 +0200 Subject: [PATCH 2/4] use docker volume --- .gitignore | 1 - docker-compose.yml | 3 ++- sipi/db/.gitkeep | 0 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 sipi/db/.gitkeep diff --git a/.gitignore b/.gitignore index 8ad2b8c78d..7c68d0f39e 100644 --- a/.gitignore +++ b/.gitignore @@ -41,7 +41,6 @@ sipi/tmp-dsp-ingest/ dependencies.txt /sipi/images/* -/sipi/db/* .idea/ .metals/ diff --git a/docker-compose.yml b/docker-compose.yml index 51b6c3d482..d9fd325bee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -68,7 +68,7 @@ services: volumes: - ./sipi/images:/opt/images:delegated - ./sipi/tmp-dsp-ingest:/opt/temp:delegated - - ./sipi/db/:/opt/db:delegated + - ingest-db:/opt/db:delegated networks: - knora-net environment: @@ -131,3 +131,4 @@ networks: volumes: db-home: db-import: + ingest-db: diff --git a/sipi/db/.gitkeep b/sipi/db/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 From 65a8b9d396890d03e62f9f5c7466115b6bed865f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinb=C3=B6lting?= Date: Tue, 2 Jul 2024 13:49:46 +0200 Subject: [PATCH 3/4] cleanup --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7c68d0f39e..3962f10233 100644 --- a/.gitignore +++ b/.gitignore @@ -58,4 +58,3 @@ docs/03-endpoints/generated-openapi/* # exclude test reports generated by xunit-viewer /index.html - From ef4ddc66a09270d5987e868db5281f1e8cbaa156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Kleinb=C3=B6lting?= Date: Tue, 2 Jul 2024 16:23:04 +0200 Subject: [PATCH 4/4] Add setup for DspIngestTestContainer --- .../org/knora/webapi/testcontainers/DspIngestTestContainer.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/integration/src/test/scala/org/knora/webapi/testcontainers/DspIngestTestContainer.scala b/integration/src/test/scala/org/knora/webapi/testcontainers/DspIngestTestContainer.scala index 436fdb5f9a..1c9101891c 100644 --- a/integration/src/test/scala/org/knora/webapi/testcontainers/DspIngestTestContainer.scala +++ b/integration/src/test/scala/org/knora/webapi/testcontainers/DspIngestTestContainer.scala @@ -33,6 +33,7 @@ object DspIngestTestContainer { .withEnv("JWT_SECRET", "UP 4888, nice 4-8-4 steam engine") .withEnv("SIPI_USE_LOCAL_DEV", "false") .withEnv("JWT_DISABLE_AUTH", "true") + .withEnv("DB_JDBC_URL", "jdbc:sqlite:/tmp/ingest.sqlite") .withFileSystemBind(imagesVolume.hostPath, assetDir, BindMode.READ_WRITE) }