Demo Business
CI / ci (push) Canceled after 0s

Updated references to a demo business.
This commit is contained in:
Stefan Lazic committed 2026-09-06 18:53:02 +01:00
1 parent 4763b50e62
commit 217c0b0101
6 files changed
+25 -25

No files matched your search

+8 -8
View File
@@ -2,7 +2,7 @@
# stacks/infra/compose.yaml for the one-time setup this depends on
# (creating this business's database on the shared MySQL server) and
# stacks/<slug>/compose.yaml for how this file is used. Copy this to
# `stacks/<slug>/.env` (e.g. `stacks/blake-heritage/.env` — kept out of
# `stacks/<slug>/.env` (e.g. `stacks/demo-business/.env` — kept out of
# git, see .gitignore) per business and fill in real values. Nothing here
# is a real credential. Normally the management UI (manager/) generates
# this file for you — this template is for the by-hand setup path.
@@ -16,12 +16,12 @@
# Manager-only bookkeeping (shown on the dashboard/edit screen, editable
# there) — the app itself never reads this; its own business name lives
# in the database, set via /install.
BUSINESS_NAME="Blake Heritage Barbershop"
BUSINESS_NAME="Demo Business"
# The public domain this business is served on — must match the .caddy
# site file's own domain (see stacks/infra/sites/.gitkeep) and that
# domain's real DNS (pointed at the VPS) before Caddy can issue a
# certificate for it.
DOMAIN="blake-heritage.example.com"
DOMAIN="demo-business.example.com"
# The app reaches MySQL via the shared infra's service hostname
# `next-chair-mysql`, never `localhost` — see stacks/infra/compose.yaml.
@@ -31,14 +31,14 @@ DOMAIN="blake-heritage.example.com"
# tells the app what to connect as.
DATABASE_HOST="next-chair-mysql"
DATABASE_PORT="3306"
DATABASE_NAME="blake_heritage"
DATABASE_USER="blake_heritage"
DATABASE_NAME="demo_business"
DATABASE_USER="demo_business"
DATABASE_PASSWORD="replace-me"
# Generate with: npx auth secret
AUTH_SECRET="replace-me-with-a-32-byte-random-string"
# Auth.js needs to trust the host it's served from when not on localhost:3000.
AUTH_TRUST_HOST="true"
NEXT_PUBLIC_APP_URL="https://blake-heritage.example.com"
NEXT_PUBLIC_APP_URL="https://demo-business.example.com"
# One-time setup token the installation wizard (/install) requires before
# it will create the first business/administrator — generate with:
# openssl rand -hex 32
@@ -51,7 +51,7 @@ CRON_SECRET="replace-me"
# Platform-level account with every Owner permission for THIS business.
# Not run automatically by this compose file (that's a Docker-entrypoint-
# only behaviour, see docker/entrypoint.sh) — run it manually, once:
# docker exec -it next-chair-blake-heritage npx tsx scripts/ensure-super-admin.ts
# docker exec -it next-chair-demo-business npx tsx scripts/ensure-super-admin.ts
# Leave SUPER_ADMIN_EMAIL blank to skip entirely and use the /install
# wizard's own administrator account instead.
SUPER_ADMIN_EMAIL=""
@@ -68,7 +68,7 @@ AUTH_GOOGLE_SECRET=""
# OAuth client from AUTH_GOOGLE_ID/SECRET above (different scopes).
GOOGLE_CALENDAR_CLIENT_ID=""
GOOGLE_CALENDAR_CLIENT_SECRET=""
GOOGLE_CALENDAR_REDIRECT_URI="https://blake-heritage.example.com/api/staff/calendar/google/callback"
GOOGLE_CALENDAR_REDIRECT_URI="https://demo-business.example.com/api/staff/calendar/google/callback"
# Encrypts stored refresh tokens at rest — generate with: openssl rand -hex 32
CALENDAR_TOKEN_ENCRYPTION_KEY=""
+1 -1
View File
@@ -6,7 +6,7 @@
#
# Only one instance of this ever runs (unlike the business image, which
# is built once and reused across every business — see
# stacks/blake-heritage/compose.yaml's own note) so a per-deploy `build:`
# stacks/demo-business/compose.yaml's own note) so a per-deploy `build:`
# in stacks/manager/compose.yaml, rather than a separately tagged image,
# is the simpler choice here.
+2 -2
View File
@@ -1,5 +1,5 @@
/**
* Generates the exact same shape as stacks/blake-heritage/compose.yaml
* Generates the exact same shape as stacks/demo-business/compose.yaml
* and stacks/marios/compose.yaml (the two hand-written example stacks) —
* keep these in sync if that shape changes.
*/
@@ -8,7 +8,7 @@ export function generateComposeYaml(slug: string): string {
const volumeName = `next-chair-media-${slug}`;
return `name: ${containerName}
# Generated by the management UI — see stacks/blake-heritage/compose.yaml
# Generated by the management UI — see stacks/demo-business/compose.yaml
# for the hand-written original this mirrors.
services:
@@ -1,4 +1,4 @@
name: next-chair-blake-heritage
name: next-chair-demo-business
# One business's app container on the shared multi-business VPS setup —
# see stacks/infra/compose.yaml for the shared MySQL/Caddy this attaches
@@ -6,9 +6,9 @@ name: next-chair-blake-heritage
# (create this business's database, copy .env.business.example, add a
# Caddy site file) needed before this file can start.
#
# docker compose -f stacks/blake-heritage/compose.yaml --env-file stacks/blake-heritage/.env up -d
# docker compose -f stacks/demo-business/compose.yaml --env-file stacks/demo-business/.env up -d
#
# `stacks/marios/compose.yaml` is the identical shape for the second
# `stacks/marios/compose.yaml` is the identical shape for another
# business — this is also the shape the management UI (manager/)
# generates for every new business it provisions.
#
@@ -18,14 +18,14 @@ name: next-chair-blake-heritage
# business is just starting/recreating a container, not a rebuild.
services:
next-chair-blake-heritage:
next-chair-demo-business:
image: nextchair-app:latest
container_name: next-chair-blake-heritage
container_name: next-chair-demo-business
restart: unless-stopped
env_file:
- .env
volumes:
- next-chair-media-blake-heritage:/app/storage/media
- next-chair-media-demo-business:/app/storage/media
healthcheck:
# No curl/wget in the node:22-alpine base image — a plain Node
# request avoids adding a package just for this. See
@@ -46,8 +46,8 @@ services:
- next-chair-edge
volumes:
next-chair-media-blake-heritage:
name: next-chair-media-blake-heritage
next-chair-media-demo-business:
name: next-chair-media-demo-business
networks:
next-chair-edge:
+4 -4
View File
@@ -6,7 +6,7 @@ name: next-chair-infra
# one shared schema — see step 1 below).
#
# Lives in stacks/infra/, one directory per stack (each with its own
# compose.yaml) — see stacks/blake-heritage/, stacks/marios/ for the same
# compose.yaml) — see stacks/demo-business/, stacks/marios/ for the same
# shape per business, and stacks/manager/ for the management UI's own
# stack. Deliberately separate from docker-compose.local.yaml at the
# repo root, which is the single-business local/Docker-Desktop setup and
@@ -31,9 +31,9 @@ name: next-chair-infra
# initdb.d scripts only ever run once against an empty data
# directory — so this one step is manual, run once per business:
# docker exec -it next-chair-mysql mysql -uroot -p
# CREATE DATABASE blake_heritage CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
# CREATE USER 'blake_heritage'@'%' IDENTIFIED BY 'choose-a-strong-password';
# GRANT ALL PRIVILEGES ON blake_heritage.* TO 'blake_heritage'@'%';
# CREATE DATABASE demo_business CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
# CREATE USER 'demo_business'@'%' IDENTIFIED BY 'choose-a-strong-password';
# GRANT ALL PRIVILEGES ON demo_business.* TO 'demo_business'@'%';
# FLUSH PRIVILEGES;
# 2. Copy .env.business.example to stacks/<slug>/.env, fill it in with
# the credentials just created and that business's domain.
+2 -2
View File
@@ -2,8 +2,8 @@ Keeps this otherwise-empty directory tracked in git.
Each business gets its own <slug>.caddy file here, e.g.:
blake-heritage.example.com {
reverse_proxy next-chair-blake-heritage:3000
demo-business.example.com {
reverse_proxy next-chair-demo-business:3000
}
Generated by the management UI (manager/) when a business is added, or