Files
datacat/docker-compose.prod.yml
GandClaude Opus 5 53d2e70723 chore: add a formatter (#233)
* chore: add a formatter, matching the style this repo already writes

singleQuote=true was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.

Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* style: format with prettier (199 files)

Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore: teach git blame to skip the reformat

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(ci): put prettier where CI actually installs

The formatter was added to the root package.json, but CI installs with
working-directory: frontend and then runs npm run verify at the root, so root
devDependencies are never installed at all. format:check died with
'prettier: not found' before checking a single file.

Root now delegates into frontend the way every other root script already does,
and prettier is a devDependency of frontend, whose lockfile CI installs.

frontend also needs its own .prettierignore: prettier resolves that file
relative to the working directory, so the root one stopped applying the moment
the command ran from frontend/ — which is how README.md and Playwright output
ended up being checked.

* fix(ci): do not format contentlayer's generated output

format:check ran green locally and failed in CI on files that do not exist
locally: CI builds contentlayer before verify, so .contentlayer/generated is
present by the time prettier looks. One generated module imports with
assert { type: 'json' }, which prettier's parser rejects outright.

A local --check cannot see build output, so generated directories have to be
ignored by name rather than discovered.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-29 11:06:25 +00:00

108 lines
2.6 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: formular-postgres-prod
environment:
POSTGRES_DB: ${DB_DATABASE:-formbuilder}
POSTGRES_USER: ${DB_USER:-formbuilder}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_INITDB_ARGS: '--encoding=UTF-8 --lc-collate=C --lc-ctype=C'
ports:
- '5432:5432'
volumes:
- postgres_prod_data:/var/lib/postgresql/data
networks:
- formular-network
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER:-formbuilder} -d ${DB_DATABASE:-formbuilder}']
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# Redis for caching and job queues
redis:
image: redis:7-alpine
container_name: formular-redis-prod
ports:
- '6379:6379'
volumes:
- redis_prod_data:/data
networks:
- formular-network
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# Main Application (Frontend + Backend)
app:
build:
context: .
dockerfile: Dockerfile
container_name: formular-app-prod
environment:
NODE_ENV: production
PORT: 5001
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: ${DB_DATABASE:-formbuilder}
DB_USER: ${DB_USER:-formbuilder}
DB_PASSWORD: ${DB_PASSWORD}
REDIS_URL: redis://redis:6379
JWT_SECRET: ${JWT_SECRET}
DATABASE_URL: postgresql://${DB_USER:-formbuilder}:${DB_PASSWORD}@postgres:5432/${DB_DATABASE:-formbuilder}
OPENAI_API_KEY: ${OPENAI_API_KEY}
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:5001}
NEXT_PUBLIC_BRAND_PRESET: ${NEXT_PUBLIC_BRAND_PRESET:-generic}
ports:
- '3000:3000'
- '5001:5001'
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- formular-network
restart: unless-stopped
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:5001/health']
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Nginx Reverse Proxy (Optional)
nginx:
image: nginx:alpine
container_name: formular-nginx-prod
ports:
- '80:80'
- '443:443'
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/nginx/ssl:ro
depends_on:
- app
networks:
- formular-network
restart: unless-stopped
profiles:
- nginx
volumes:
postgres_prod_data:
driver: local
redis_prod_data:
driver: local
networks:
formular-network:
driver: bridge