41170d9155
- Photo lightbox: ArrowLeft/Right/Escape keyboard navigation - Growth chart: persistent WHO percentile legend (not hover-only) - Sleep stats: configurable window selector (18h/19h/20h/21h) - Quick-add FAB: now visible on desktop (bottom-right corner) - Invite code reset button in settings (non-admin, PARENT role only) - Pending email invites: tracked per-token with 7-day expiry, revocable from settings UI; new /auth/invite/t/[token] accept page - Webhooks: Prisma model, CRUD API, HMAC-SHA256 dispatcher wired into event.created / growth.created / doctor_note.created; settings UI - Docker cron service: medication reminders every 15min, milk-expiry and daily-digest daily; secured with CRON_SECRET - Photo uploads persist across redeploys via Docker named volume Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: grow
|
|
POSTGRES_USER: grow
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
app:
|
|
build: .
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- "${PORT:-3000}:3000"
|
|
volumes:
|
|
- uploads_data:/data/uploads
|
|
environment:
|
|
UPLOAD_DIR: /data/uploads
|
|
DATABASE_URL: "postgresql://grow:${POSTGRES_PASSWORD}@db:5432/grow"
|
|
NEXTAUTH_URL: ${NEXTAUTH_URL}
|
|
AUTH_SECRET: ${AUTH_SECRET}
|
|
SUPERADMIN_EMAIL: ${SUPERADMIN_EMAIL}
|
|
# Optional
|
|
SMTP_HOST: ${SMTP_HOST:-}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
SMTP_USER: ${SMTP_USER:-}
|
|
SMTP_PASS: ${SMTP_PASS:-}
|
|
SMTP_FROM: ${SMTP_FROM:-}
|
|
PUSHOVER_APP_TOKEN: ${PUSHOVER_APP_TOKEN:-}
|
|
VAPID_PUBLIC_KEY: ${VAPID_PUBLIC_KEY:-}
|
|
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
|
|
VAPID_SUBJECT: ${VAPID_SUBJECT:-}
|
|
CRON_SECRET: ${CRON_SECRET:-}
|
|
|
|
migrate:
|
|
build:
|
|
context: .
|
|
target: builder
|
|
command: sh -c "sleep 5 && node_modules/.bin/prisma db push"
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
DATABASE_URL: "postgresql://grow:${POSTGRES_PASSWORD}@db:5432/grow"
|
|
restart: "no"
|
|
|
|
cron:
|
|
image: alpine:3.19
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- app
|
|
environment:
|
|
APP_URL: "http://app:3000"
|
|
CRON_SECRET: ${CRON_SECRET:-}
|
|
command: >
|
|
sh -c "
|
|
echo '*/15 * * * * wget -qO- --header=\"Authorization: Bearer $$CRON_SECRET\" --post-data= $$APP_URL/api/reminders/check > /dev/null 2>&1' > /etc/crontabs/root &&
|
|
echo '0 8 * * * wget -qO- --header=\"Authorization: Bearer $$CRON_SECRET\" --post-data= $$APP_URL/api/cron/milk-expiry > /dev/null 2>&1' >> /etc/crontabs/root &&
|
|
echo '0 7 * * * wget -qO- --header=\"Authorization: Bearer $$CRON_SECRET\" --post-data= $$APP_URL/api/cron/daily-digest > /dev/null 2>&1' >> /etc/crontabs/root &&
|
|
crond -f -l 8
|
|
"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
uploads_data:
|