- Tooling and automation: - update Dependabot and the frontend test workflow to read frontend-owned paths - keep published frontend test reports aligned with the renamed project directory - extend ignore rules for frontend-generated test output and local dependencies - Local developer entrypoints: - repoint the root Justfile ui module at frontend/Justfile - update the dev compose bind mount to use ./frontend - update the Weblate setup script to source translations from frontend/src/i18n - Build integration: - repoint the Docker frontend build stage to /workspace/frontend and the renamed source paths - update the backend Gradle fallback dist location to ../frontend/dist/grimmory/browser - Repository guidance: - rewrite root docs and AGENTS references that still pointed at booklore-ui so contributor guidance matches the new directory name - Validation: - not run; this commit is scoped to staged path rewrites only
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile_inline: |
|
|
FROM linuxserver/unrar:7.1.10 AS unrar-layer
|
|
FROM gradle:9.3.1-jdk25-alpine
|
|
RUN apk add --no-cache libstdc++ libgcc
|
|
COPY --from=unrar-layer /usr/bin/unrar-alpine /usr/local/bin/unrar
|
|
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
|
|
|
|
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
|
|
|
|
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:
|
|
- './frontend:/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:
|