Files
booklore/dev.docker-compose.yml
Balázs Szücs f3fffeadce refactor(misc): Harden request handling, tighten defaults, and pin CI deps (#2878)
* refactor(misc): Harden request handling, tighten defaults, and pin CI dependencies

* feat(auth): normalize usernames for login rate limiting

* refactor(epub): fix XML document builder creation

* feat(http): enhance image download with redirect handling and DNS rebinding protection

* chore: upgrade Node.js version to 24 and add frontend dependency audit step

* feat(auth): refactor username normalization for login rate limiting and enhance image download security

* fix(metadata): simplify JAXB validation event handling by using direct import

* chore(pipeline): remove unnecessary --force flag from npm ci and format audit step

* chore(pipeline): streamline frontend dependency audits and add validation step

* fix(image): improve error handling for image processing and download, enforce pixel limits

* test(image): update tests

* fix(icon): update DOMPurify import and replace deprecated theme package

* fix(imports): update theme package imports and format code for consistency

* fix(cors): update allowed origins configuration to support wildcard and trim whitespace
2026-02-24 12:43:14 -07:00

70 lines
2.2 KiB
YAML

services:
backend:
image: gradle:9.3.1-jdk25-alpine
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/booklore
- DATABASE_USERNAME=booklore
- DATABASE_PASSWORD=booklore
- 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
backend_db:
image: mariadb:11.4
container_name: backend_db
volumes:
- backend_db:/var/lib/mysql
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=booklore
- MYSQL_DATABASE=booklore
- MYSQL_USER=booklore
- MYSQL_PASSWORD=booklore
ports:
- "${DB_PORT:-3366}:3306"
healthcheck:
test: [ "CMD", "mariadb-admin", "ping", "-h", "localhost", "-uroot", "-pbooklore" ]
interval: 10s
timeout: 5s
retries: 5
ui:
image: node:22-alpine
command: sh -c "cd /angular-app && npm install -g @angular/cli --force && npm install --force && ng serve --host 0.0.0.0"
environment:
- NODE_ENV=development
stdin_open: true
tty: true
restart: unless-stopped
volumes:
- './booklore-ui:/angular-app'
# you can have node_modules in a volume. however, if you enable this, expect trouble in some IDEs, as the deps are not available anymore
# - node_modules:/angular-app/node_modules
# we ignore package-lock otherwise will throw
# An unhandled exception occurred: Cannot find module @rollup/rollup-linux-x64-musl. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828).
# Please try `npm i` again after removing both package-lock.json and node_modules directory.
- '/dev/null:/angular-app/package-lock.json'
ports:
- "${FRONTEND_PORT:-4200}:4200"
volumes:
node_modules:
backend_db: