MailService renders transactional mails (verify-email, reset-password) from the new de/en `mails` i18n namespace — text plus minimal HTML with escaped interpolation — and enqueues them into mail_outbox. MailWorker delivers pending rows every 15s through an injectable transport (nodemailer; faked in tests) with quadratic backoff and a permanent FAILED state after five attempts, logged as a warning. SMTP_* and APP_BASE_URL join the environment schema with defaults matching the new Mailpit container in the dev overlay. Closes #12 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
75 lines
2.6 KiB
YAML
75 lines
2.6 KiB
YAML
# Development overlay: hot-reloading web and api containers with the
|
|
# repository mounted, layered over the production stack definition.
|
|
#
|
|
# Full containerized dev environment (first start installs dependencies):
|
|
# cd deploy/compose && cp .env.example .env
|
|
# docker compose -f docker-compose.yml -f compose.dev.yml up
|
|
# → web http://localhost:5173, api http://localhost:3001, db localhost:5434
|
|
#
|
|
# Database-only (run web/api natively for the fastest feedback):
|
|
# docker compose -f docker-compose.yml -f compose.dev.yml up -d db
|
|
# DATABASE_URL=postgresql://dorfteich:dorfteich@localhost:5434/dorfteich \
|
|
# PORT=3001 pnpm --filter @dorfteich/api start:dev
|
|
# pnpm --filter @dorfteich/web dev
|
|
|
|
services:
|
|
web:
|
|
image: node:22.15-alpine
|
|
build: !reset null
|
|
working_dir: /repo
|
|
command: sh -c "npm i -g pnpm@11 && pnpm install && pnpm --filter @dorfteich/web dev -- --host 0.0.0.0"
|
|
environment:
|
|
VITE_API_PROXY_TARGET: http://api:3000
|
|
ports: !override
|
|
- '127.0.0.1:5173:5173'
|
|
volumes:
|
|
- ../..:/repo
|
|
# Container-local node_modules: the host directories contain
|
|
# macOS binaries and must not leak into the Linux containers.
|
|
- web-root-modules:/repo/node_modules
|
|
- web-app-modules:/repo/apps/web/node_modules
|
|
- shared-modules:/repo/packages/shared/node_modules
|
|
- pnpm-store:/root/.local/share/pnpm/store
|
|
depends_on: !reset []
|
|
|
|
api:
|
|
image: node:22.15-alpine
|
|
build: !reset null
|
|
working_dir: /repo
|
|
command: sh -c "npm i -g pnpm@11 && pnpm install && pnpm --filter @dorfteich/shared build && pnpm --filter @dorfteich/api start:dev"
|
|
environment:
|
|
NODE_ENV: development
|
|
PORT: '3000'
|
|
DATABASE_URL: postgresql://dorfteich:${POSTGRES_PASSWORD:-dorfteich}@db:5432/dorfteich
|
|
ports: !override
|
|
- '127.0.0.1:3001:3000'
|
|
volumes:
|
|
- ../..:/repo
|
|
- api-root-modules:/repo/node_modules
|
|
- api-app-modules:/repo/apps/api/node_modules
|
|
- api-shared-modules:/repo/packages/shared/node_modules
|
|
- pnpm-store:/root/.local/share/pnpm/store
|
|
|
|
db:
|
|
ports:
|
|
# 5434 on the host to avoid colliding with other local PostgreSQL
|
|
# instances (5432 system, 5433 wochenplan-staging).
|
|
- '127.0.0.1:5434:5432'
|
|
|
|
# Local SMTP catcher: UI on http://localhost:8025, SMTP on 1025 —
|
|
# matches the api's SMTP_* defaults.
|
|
mailpit:
|
|
image: axllent/mailpit:latest
|
|
ports:
|
|
- '127.0.0.1:1025:1025'
|
|
- '127.0.0.1:8025:8025'
|
|
|
|
volumes:
|
|
web-root-modules:
|
|
web-app-modules:
|
|
shared-modules:
|
|
api-root-modules:
|
|
api-app-modules:
|
|
api-shared-modules:
|
|
pnpm-store:
|