chore: initial commit — monorepo ReadaBook (API NestJS, web PWA, Docker)

This commit is contained in:
Git Agent
2026-08-23 09:56:53 +02:00
commit 8f1140127f
79 changed files with 6456 additions and 0 deletions

38
docker-compose.yaml Normal file
View File

@ -0,0 +1,38 @@
services:
api:
build:
context: .
dockerfile: Dockerfile
environment:
NODE_ENV: production
PORT: "3000"
HOST: 0.0.0.0
DATABASE_PATH: /data/readabook.sqlite
STORAGE_DIR: /data/storage
JWT_SECRET: ${JWT_SECRET:-dev-change-me-readabook}
OPEN_LIBRARY_ENABLED: ${OPEN_LIBRARY_ENABLED:-true}
volumes:
- ./data:/data
- ./data/library:/library:ro
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
web:
build:
context: .
dockerfile: apps/web/Dockerfile
depends_on:
api:
condition: service_healthy
ports:
- "3000:80"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s