Files
NextChair/docker-compose.local.yaml
T
Stefan Lazic 9e39908ea7 Post Phase 8 - Fixes 1
Delivered:

Super Administrator — env-var provisioned, no StaffProfile at all (structural exclusion from Team/barber-picker/appointments/staff-totals, not a filter). hasPermission short-circuit + new getActingBusinessContext() helper retrofitted across 16 owner pages so it can actually manage the business.
Media Manager — one upload/library/external-URL modal + field picker, backing every image field app-wide. Local-disk storage + Docker volume, SVG rejected, size-capped.
Welcome backgrounds — desktop/mobile images with CSS breakpoint swap.
Business Branding settings — logo/cover/welcome/favicon/icon/colours all editable post-install; cover image finally rendered (was dead config).
Service descriptions — now surfaced on Home and in the booking flow.
Loyalty card — live preview, ColorPicker/MediaPicker/IconPicker, flip removed for a static premium-styled card, Loyalty added to bottom nav. Fixed a real pre-existing bug where the card's configured colour/image/icon were stored but never actually rendered.
Home Screen Redesign — hero gallery + sticky Services/Portfolio/Reviews/Details tabs, backed by a new unified gallery model/service (no hero/portfolio duplication). Details tab surfaces social links and a map that were never shown before.
Google Reviews — real sync pipeline (24h cron, CRON_SECRET-gated, mirrors the existing notification cron exactly), DB-only customer reads, owner hide/unhide + policy management page.
Architecture cleanup — SettingsPageShell extracted from 6 duplicated page wrappers; fixed a second pre-existing bug where branding image fields could never actually be cleared once set.
Verification: 418 tests passing (236 unit + 182 integration, all against a real MySQL database), full typecheck/lint clean across src, and a real Docker build+run cycle — which caught and fixed a genuine bug (scripts/ wasn't copied into the production image, so Super Admin sync would have crashed on every real deployment).
2026-08-04 17:10:30 +01:00

101 lines
3.1 KiB
YAML

name: next-chair
# Local Docker Desktop deployment — production-style by default (real
# migrations, no auto-seed), not a dev-mode source-mount setup. See the
# README section this file is documented under for exact commands.
#
# Config source of truth: copy .env.local.example to .env.local and run
# every command below with `--env-file .env.local` (see README) — that
# one file drives both container environment variables (via each
# service's `env_file:`) and the few values this compose file itself
# needs (the host-port mappings below).
services:
next-chair-mysql:
image: mysql:8.0
container_name: next-chair-mysql
restart: unless-stopped
env_file:
- .env.local
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_ai_ci
ports:
- "${MYSQL_HOST_PORT:-3306}:3306"
volumes:
- next-chair-mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-u", "root", "-p${MYSQL_ROOT_PASSWORD:-change-me-too}"]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
networks:
- next-chair
next-chair:
build:
context: .
dockerfile: Dockerfile
container_name: next-chair
restart: unless-stopped
depends_on:
next-chair-mysql:
condition: service_healthy
env_file:
- .env.local
ports:
- "${APP_HOST_PORT:-3000}:3000"
volumes:
# Media Manager uploads (Phase 9) — served directly by Next's own
# static handling for public/, so no separate storage service is
# needed in this deployment model; this volume is what makes an
# uploaded file survive `docker compose down`/a rebuild. See
# src/lib/media/media-storage.ts.
- next-chair-media:/app/public/media
healthcheck:
# No curl/wget in the node:22-alpine base image — a plain Node
# request avoids adding a package just for this. See
# src/app/api/health/route.ts: healthy as soon as the database is
# reachable, even before installation completes.
test:
[
"CMD",
"node",
"-e",
"require('http').get('http://localhost:3000/api/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))",
]
interval: 10s
timeout: 5s
retries: 10
start_period: 20s
networks:
- next-chair
# Explicit, opt-in only — never runs as part of a normal `up` (see the
# `profiles` key). Development/demo fixtures, not a production seed —
# see prisma/seed.ts's own header and docs/phase-8-summary.md,
# "Production installation versus development seed."
next-chair-seed:
build:
context: .
dockerfile: Dockerfile
container_name: next-chair-seed
profiles: ["seed"]
depends_on:
next-chair-mysql:
condition: service_healthy
env_file:
- .env.local
entrypoint: ["npx", "tsx", "prisma/seed.ts"]
networks:
- next-chair
volumes:
next-chair-mysql-data:
name: next-chair-mysql-data
next-chair-media:
name: next-chair-media
networks:
next-chair:
name: next-chair