Full-stack web application for C2PA content credentials management. - Backend: Fastify + TypeScript + Drizzle ORM + @contentauth/c2pa-node - Frontend: React 19 + Vite + Tailwind CSS 4 + Montserrat/Gold theme - Auth: JWT with 3 roles (viewer, stamper, admin) - C2PA: Sign files with X.509 certs, verify manifests, custom OMG metadata - Admin: Manage users, platforms (OMG, Pencil), 29 AI models - Docker: PostgreSQL 16, Node.js 22 backend, nginx frontend - Ports: Frontend 3050, Backend 8050, PostgreSQL 5470 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: c2pa-postgres
|
|
ports:
|
|
- "5470:5432"
|
|
environment:
|
|
POSTGRES_DB: c2pa
|
|
POSTGRES_USER: c2pa_user
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-c2pa_dev_password}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U c2pa_user -d c2pa"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: c2pa-backend
|
|
ports:
|
|
- "8050:8050"
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 8050
|
|
DATABASE_URL: postgresql://c2pa_user:${POSTGRES_PASSWORD:-c2pa_dev_password}@postgres:5432/c2pa
|
|
STORAGE_PATH: /app/storage
|
|
CERT_ENCRYPTION_KEY: ${CERT_ENCRYPTION_KEY}
|
|
CORS_ORIGIN: http://localhost:3050
|
|
MAX_FILE_SIZE: 104857600
|
|
volumes:
|
|
- file_storage:/app/storage
|
|
- ./certs:/app/certs:ro
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "fetch('http://localhost:8050/api/health').then(r => r.ok ? process.exit(0) : process.exit(1))"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
args:
|
|
VITE_API_URL: http://localhost:8050
|
|
container_name: c2pa-frontend
|
|
ports:
|
|
- "3050:80"
|
|
depends_on:
|
|
- backend
|
|
|
|
volumes:
|
|
pgdata:
|
|
file_storage:
|