Files
vigilcare-records/docker-compose.prod.yml
T
Trent a17bc2b734
CI / changes (push) Successful in 17s
dotnet8-ci / build-and-test (push) Successful in 8m23s
CI / backend (push) Successful in 8m24s
node-ci / build (push) Failing after 2m1s
CI / frontend (push) Failing after 2m2s
Harden API memory and CPU usage across Phases 19–22.
Bound list/PDF payloads, stream MinIO I/O with cancellation, paginate history and FHIR $everything, tighten OCR lifetimes/buffers, and add phase tracking docs.
2026-11-30 23:55:56 +08:00

80 lines
2.9 KiB
YAML

# Production overlay. Runs ONLY the two application containers — Postgres,
# Redis, MinIO, and Seq are pre-existing services shared with VigilCareClinical,
# reached through the external "shared-services" Docker network. This project
# does not create that network; VigilCareClinical's own compose stack must
# already be running the first time this stack is deployed.
#
# docker compose -f docker-compose.prod.yml --env-file .env up -d
#
# Does not extend docker-compose.yml. Local-dev infra stays in that file; this
# one ships only the deployable apps.
name: vigilcare-records
services:
api:
image: ${REGISTRY}/vigilcare-records-api:${IMAGE_TAG}
container_name: vigilcare_records_api
restart: unless-stopped
ports:
- "${API_PORT:-5217}:8080"
environment:
ASPNETCORE_ENVIRONMENT: Production
ConnectionStrings__DefaultConnection: "${PG_CONNECTION}"
Redis__ConnectionString: "${REDIS_CONNECTION}"
Seq__ServerUrl: "${SEQ_URL}"
Serilog__WriteTo__1__Args__serverUrl: "${SEQ_URL}"
Serilog__WriteTo__1__Args__apiKey: "${SEQ_API_KEY}"
Minio__Endpoint: "${MINIO_ENDPOINT}"
Minio__AccessKey: "${MINIO_ACCESS_KEY}"
Minio__SecretKey: "${MINIO_SECRET_KEY}"
Minio__BucketName: "${MINIO_BUCKET_NAME:-vigilcare-records-scans}"
Minio__UseSsl: "${MINIO_USE_SSL:-false}"
Jwt__Secret: "${JWT_SECRET}"
Jwt__Issuer: "${JWT_ISSUER:-VigilCareRecords}"
Jwt__Audience: "${JWT_AUDIENCE:-VigilCareRecords}"
Cors__AllowedOrigins__0: "${DASHBOARD_ORIGIN}"
networks:
- vigilcare_records_prod
- shared-services
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health/live"]
interval: 10s
timeout: 5s
retries: 6
start_period: 40s
logging:
driver: json-file
options: { max-size: "50m", max-file: "5" }
deploy:
resources:
# 1G is a starting cap. Revisit after measuring peak working-set under
# concurrent document downloads + OCR with dotnet-counters
# (working-set, gc-heap-size, loh-size). See docs/plans/performance-hardening-overview.md.
# Do not raise this limit without measured peak evidence.
limits: { memory: 1G }
dashboard:
image: ${REGISTRY}/vigilcare-records-dashboard:${IMAGE_TAG}
container_name: vigilcare_records_dashboard
restart: unless-stopped
ports:
- "${DASHBOARD_PORT:-8089}:80"
depends_on:
api:
condition: service_healthy
networks:
- vigilcare_records_prod
logging:
driver: json-file
options: { max-size: "20m", max-file: "3" }
networks:
vigilcare_records_prod:
driver: bridge
# Owned by the Postgres/Redis/MinIO/Seq compose project shared with
# VigilCareClinical (it defines and creates "shared-services" via its own
# `docker compose up`). This project only consumes it.
shared-services:
external: true