Component architecture - Reorganise src/lib/components into pages/, sections/, ui/ subdirectories and update all imports across routes and tests. Owner admin dashboard (+2k lines) - Scheduled welcome-pack emails: durable queue with cancel/reschedule and a background sender loop (SCHEDULED_CHECK_INTERVAL_SECONDS, default 60s). - Custom welcome-pack subject line, preview recipients, and client BCC. - Add-client, edit client profile, and reset-onboarding flows. - "View as client" onboarding preview (owner impersonation, dry-run submit). - Tabbed owner welcome route (/owner/welcome/[[tab]]). MYOB integration - New mail_api/myob.py: create new clients as MYOB AccountRight customer contacts. Disabled until all MYOB_* env vars are set (no-op otherwise). Onboarding - New "Does your dog resource guard?" Yes/No question in the Behaviour step. - Persist vetAddress, flea/tick, and pet-insurance fields server-side. Misc - vite config, new hooks.ts, responsive CSS tweaks, deploy/docker config, mail-api README and start-dev.ps1. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
75 lines
2.3 KiB
YAML
75 lines
2.3 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
args:
|
|
APP_VERSION: ${APP_VERSION:-4.0.1}
|
|
environment:
|
|
APP_VERSION: ${APP_VERSION:-4.0.1}
|
|
DATABASE_URL: postgresql://${POSTGRES_USER:-goodwalk}:${POSTGRES_PASSWORD:-goodwalk}@db:5432/${POSTGRES_DB:-goodwalk}
|
|
NODE_ENV: production
|
|
PORT: ${APP_PORT:-3000}
|
|
ENABLE_GENERAL_ENQUIRIES: ${ENABLE_GENERAL_ENQUIRIES:-false}
|
|
PUBLIC_ENABLE_MOBILE_CTA_BUTTON: ${PUBLIC_ENABLE_MOBILE_CTA_BUTTON:-false}
|
|
PUBLIC_ENABLE_ENHANCED_CONTENT_IMAGES: ${PUBLIC_ENABLE_ENHANCED_CONTENT_IMAGES:-false}
|
|
TZ: ${TZ:-Pacific/Auckland}
|
|
depends_on:
|
|
- db
|
|
restart: unless-stopped
|
|
|
|
mail-api:
|
|
build:
|
|
context: ./mail-api
|
|
args:
|
|
APP_VERSION: ${APP_VERSION:-4.0.1}
|
|
environment:
|
|
APP_VERSION: ${APP_VERSION:-4.0.1}
|
|
RESEND_API_KEY: ${RESEND_API_KEY}
|
|
OWNER_EMAIL: ${OWNER_EMAIL}
|
|
OWNER_BCC: ${OWNER_BCC:-}
|
|
CLIENT_BCC: ${CLIENT_BCC:-}
|
|
FROM_EMAIL: ${FROM_EMAIL:-GoodWalk <info@goodwalk.co.nz>}
|
|
REPLY_TO: ${REPLY_TO:-info@goodwalk.co.nz}
|
|
ENABLE_GENERAL_ENQUIRIES: ${ENABLE_GENERAL_ENQUIRIES:-false}
|
|
DATA_DIR: ${MAIL_API_DATA_DIR:-/app/data}
|
|
# MYOB integration (optional — see deploy.env.template).
|
|
MYOB_API_KEY: ${MYOB_API_KEY:-}
|
|
MYOB_API_SECRET: ${MYOB_API_SECRET:-}
|
|
MYOB_REFRESH_TOKEN: ${MYOB_REFRESH_TOKEN:-}
|
|
MYOB_COMPANY_FILE_URI: ${MYOB_COMPANY_FILE_URI:-}
|
|
MYOB_CF_USERNAME: ${MYOB_CF_USERNAME:-Administrator}
|
|
MYOB_CF_PASSWORD: ${MYOB_CF_PASSWORD:-}
|
|
TZ: ${TZ:-Pacific/Auckland}
|
|
volumes:
|
|
- mail_api_data:${MAIL_API_DATA_DIR:-/app/data}
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-goodwalk}
|
|
POSTGRES_USER: ${POSTGRES_USER:-goodwalk}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-goodwalk}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./docker/postgres/init:/docker-entrypoint-initdb.d:ro
|
|
restart: unless-stopped
|
|
|
|
nginx:
|
|
image: nginx:1.27-alpine
|
|
depends_on:
|
|
- app
|
|
- mail-api
|
|
ports:
|
|
- '80:80'
|
|
- '443:443'
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- /etc/letsencrypt:/etc/letsencrypt:ro
|
|
- /var/www/certbot:/var/www/certbot:ro
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|
|
mail_api_data:
|