Three upstream Docmost services (export, version, telemetry) require
'../../../package.json' relative to source. In nest start dist mode the
relative path resolves one level too short and crashes at boot.
Wrap each require in a try/catch fallback that walks up one extra level,
defaulting to { version: 'dev' } if neither resolves. Boot now succeeds
both in dev (tsx) and in dist (node dist/main).
Also adds docker-compose.dev.yml for an isolated dev stack on ports
5433/6380, kept in repo for future dev sessions.
Patch 018.
31 lines
726 B
YAML
31 lines
726 B
YAML
services:
|
|
db-dev:
|
|
image: postgres:16-alpine
|
|
container_name: docadenice-dev-db
|
|
environment:
|
|
POSTGRES_DB: docadenice_dev
|
|
POSTGRES_USER: docadenice
|
|
POSTGRES_PASSWORD: dev_password_local_only
|
|
ports:
|
|
- "127.0.0.1:5433:5432"
|
|
volumes:
|
|
- dev_db_data:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U docadenice -d docadenice_dev"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
|
|
redis-dev:
|
|
image: redis:7-alpine
|
|
container_name: docadenice-dev-redis
|
|
ports:
|
|
- "127.0.0.1:6380:6379"
|
|
volumes:
|
|
- dev_redis_data:/data
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
dev_db_data:
|
|
dev_redis_data:
|