Files
grimmory/dev.docker-compose.yml
T
James Ward 1e0b4d0fd5 refactor(api): use NightCompress library for reading CBX (#113)
* build: drop unrar from dockerfile

* build: add libarchive to dockerfile

* ci: add libarchive for tests

* build: try adding to the gradle build

* refactor: use nightcompress for reading CBX

* test: disable tests using nightcompress when unavailable

* ci: drop showing java information

* build: add libarchive to dev compose

* build: fix libarchive link in alpine

seems alpine doesn't create libarchive.so and this seems to be the
easiest approach to fix that

* build: use expected order for allowing java to use native libs

* fix: ensure we initialize NightCompress before using it

* fix: properly find input stream

* fix: return amount of data copied

* test: add helper to turn off tests in ArchiveService

* test: rewrite CbxMetadataExtractorTest to mock archiveService

* refactor: expose `Path` to make `CbxMetadataExtractor` easier to test

* test: drop now useless test

* test: add archiveservice to rar5 integration

* test: mock out archiveservice in cbxreader test

* test: use real archiveservice in cbxconverstionintegration

* file: the cbxconversionservicetest also seems to be integration

* test: remove unused imports from cbxmetadataextractortest

* test: cbxcomicinfocompliance is also an integration

* test: cbxmetadatawriter is also integration

* chore: drop unused properties

* test: make cbxmetadataextractortest do something for covers

before it was basically useless because of fallback

* fix: invert check

* chore: better comment

* test: fix more cbxmetadataextractor tests that never worked

* test: we only ever raise ioexception

* fix: handle `null` comicinfo when parsing

* test: properly test for no files comicinfo

* build: manual link of dev docker compose

* test: if you use any matchers, all must be

* build: drop unrar from dev compose

* test: if you use any matchers, all must be

* test: always get a fresh stream

* test: drop more toFile
2026-04-22 17:26:59 -04:00

65 lines
1.9 KiB
YAML

services:
backend:
build:
context: .
dockerfile_inline: |
FROM gradle:9.3.1-jdk25-alpine
RUN apk add --no-cache libstdc++ libgcc libarchive
RUN ln -s /usr/lib/libarchive.so.13 /usr/lib/libarchive.so
command: sh -c "cd /booklore-api && ./gradlew bootRun"
ports:
- "${BACKEND_PORT:-6060}:6060"
- "127.0.0.1:${REMOTE_DEBUG_PORT:-5005}:5005"
environment:
- DATABASE_URL=jdbc:mariadb://backend_db:3306/grimmory
- DATABASE_USERNAME=grimmory
- DATABASE_PASSWORD=grimmory
- REMOTE_DEBUG_ENABLED=true
- ALLOWED_ORIGINS=http://localhost:4200
stdin_open: true
tty: true
restart: unless-stopped
depends_on:
- backend_db
volumes:
- './booklore-api:/booklore-api'
- /booklore-api/build
- /booklore-api/.gradle
- ./shared/data:/app/data
- ./shared/books:/books
- ./shared/bookdrop:/bookdrop
frontend:
image: node:24-alpine
command: sh -c "cd /angular-app && corepack enable && corepack yarn install --immutable && corepack yarn ng serve --host 0.0.0.0 --watch --configuration development"
environment:
- NODE_ENV=development
stdin_open: true
tty: true
restart: unless-stopped
volumes:
- './frontend:/angular-app'
- node_modules:/angular-app/node_modules
ports:
- "${FRONTEND_PORT:-4200}:4200"
backend_db:
image: mariadb:11.4
container_name: backend_db
volumes:
- backend_db:/var/lib/mysql
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=grimmory
- MYSQL_DATABASE=grimmory
- MYSQL_USER=grimmory
- MYSQL_PASSWORD=grimmory
ports:
- "${DB_PORT:-3366}:3306"
healthcheck:
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-pgrimmory"]
interval: 10s
timeout: 5s
retries: 5
volumes:
node_modules:
backend_db: