- examples/fixture-invoicing/: FastAPI + Vue + Postgres demo (4-entity invoice fixture)
- cfg/sample/: wraps the fixture (managed.repos points at examples/)
- ctrl/kind-{up,down,status}.sh + per-room k8s render in soleprint/ctrl/k8s/
- build.py: relative repo paths, resilient rmtree, optional k8s render hook
- cfg/.gitignore: stop ignoring sample/ and standalone/ template rooms
Manifests render cleanly but kind cluster has not been run end-to-end yet.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
# Sample Room — Managed App Services (Fixture Invoicing)
|
|
#
|
|
# Runs backend + frontend + postgres on the shared sample_network,
|
|
# so soleprint + nginx can wrap them from cfg/sample/soleprint/.
|
|
#
|
|
# Usage (from gen/sample/sample/):
|
|
# docker compose up -d
|
|
|
|
name: ${DEPLOYMENT_NAME}
|
|
|
|
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: ${DEPLOYMENT_NAME}_db
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
ports:
|
|
- "${DB_PORT}:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
networks:
|
|
- default
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
container_name: ${DEPLOYMENT_NAME}_backend
|
|
environment:
|
|
DB_HOST: db
|
|
DB_PORT: 5432
|
|
DB_NAME: ${POSTGRES_DB}
|
|
DB_USER: ${POSTGRES_USER}
|
|
DB_PASSWORD: ${POSTGRES_PASSWORD}
|
|
SEED_ON_START: "true"
|
|
ports:
|
|
- "${BACKEND_PORT}:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- default
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
container_name: ${DEPLOYMENT_NAME}_frontend
|
|
environment:
|
|
# Browser hits /api/ via nginx, so leave blank to use same-origin
|
|
VITE_API_URL: ""
|
|
ports:
|
|
- "${FRONTEND_PORT}:5173"
|
|
depends_on:
|
|
- backend
|
|
volumes:
|
|
- ./frontend/src:/app/src
|
|
- ./frontend/index.html:/app/index.html
|
|
- ./frontend/vite.config.js:/app/vite.config.js
|
|
networks:
|
|
- default
|
|
|
|
volumes:
|
|
pgdata:
|
|
|
|
networks:
|
|
default:
|
|
external: true
|
|
name: ${NETWORK_NAME}
|