Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/juescoryisus/QualityDocD/llms.txt

Use this file to discover all available pages before exploring further.

QualityDocD is packaged as a multi-container system split across three Docker Compose files. This separation lets you start or restart each layer independently — helpful during development when you need to rebuild application containers without touching your databases. docker-compose.infra.yml owns the three databases and their named volumes; docker-compose.apps.yml builds and runs the four application services; and docker-compose.portal.yml isolates the PHP portal so it can be deployed or restarted on its own. All seven containers share a single bridge network called qualitydoc_net, which is created by the infra compose file and referenced as external by the other two.

Prerequisites

Before running any compose command, make sure the following are in place:

Docker Desktop (or Engine + Compose)

Docker Desktop v4.x or later on Windows/macOS. On Linux, install Docker Engine plus the Compose plugin (docker compose v2).

Available RAM

At least 4 GB of RAM allocated to Docker. SQL Server 2022 alone requires 2 GB; the remaining services add another 1–1.5 GB under load.

PowerShell 7+ (Windows, optional)

Required only if you want to use setup.ps1. Non-Windows users can run the equivalent docker compose commands directly.

.env file

Copy .env.example to .env and edit secrets before starting any container. See the Configuration page for every variable.

The Three Compose Files

docker-compose.infra.yml

Infrastructure layer. Runs SQL Server 2022 (qualitydoc_sqlserver:1433), PostgreSQL 16 (qualitydoc_postgres:5432), and MongoDB 7 (qualitydoc_mongodb:27017). Creates the three named volumes (sqlserver_data, postgres_data, mongodb_data) and the qualitydoc_net bridge network. Each engine has a Docker health check.

docker-compose.apps.yml

Application layer. Builds and runs the .NET app (qualitydoc_app:5001), Node.js API (qualitydoc_node_api:5000), Search Service (qualitydoc_search:3001), and PHP portal (qualitydoc_php:8080). Declares qualitydoc_net as an external network — infra must already be up.

docker-compose.portal.yml

Standalone portal. Runs only the PHP portal container on port 8080. Use this when you want to restart or redeploy the portal without touching the backend services.

Container Reference

Container nameCompose fileImage / BuildHost portInternal port
qualitydoc_sqlserverinframcr.microsoft.com/mssql/server:2022-latest14331433
qualitydoc_postgresinfrapostgres:16-alpine54325432
qualitydoc_mongodbinframongo:72701727017
qualitydoc_appapps./QualityDocD/Dockerfile50015000
qualitydoc_node_apiapps./node-api/Dockerfile50005000
qualitydoc_searchapps./search-service/Dockerfile30013001
qualitydoc_phpapps / portal./php-portal/Dockerfile808080

Named Volumes

Volume nameDatabaseMount path inside container
sqlserver_dataSQL Server/var/opt/mssql
postgres_dataPostgreSQL/var/lib/postgresql/data
mongodb_dataMongoDB/data/db
Named volumes persist across container restarts and docker compose down commands. Your data survives unless you explicitly pass -v to down. See Reset Data below.

Full Deployment

1

Clone the repository

git clone https://github.com/juescoryisus/QualityDocD.git
cd QualityDocD
2

Create and configure the .env file

cp .env.example .env
Open .env in your editor and replace the placeholder passwords and secrets. At minimum, change SQLSERVER_SA_PASSWORD, PG_PASSWORD, MONGO_PASSWORD, and SESSION_SECRET before any internet-facing deployment.See Configuration for the full variable reference.
3

Start all services

Run everything with one command using setup.ps1 on Windows, or fire the three compose commands manually on any platform.
.\setup.ps1 -Mode All
setup.ps1 -Mode All starts infra first, then polls each database container’s health status before bringing up the apps layer. It also opens QualityDocD.csproj in Visual Studio after startup (pass -SkipVS to suppress this).
4

Wait for database health checks

The databases need a moment to initialize before the application layer can connect. Docker’s built-in health checks report readiness:
DatabaseStart delayCheck intervalReady signal
SQL Server 202230 s15 s (8 retries)sqlcmd SELECT 1 exits 0
PostgreSQL 1610 s10 s (5 retries)pg_isready exits 0
MongoDB 720 s15 s (5 retries)mongosh db.adminCommand('ping').ok returns 1
Check health status at any time:
docker compose -f docker-compose.infra.yml ps
5

Verify first-run migrations and seed data

The .NET application (qualitydoc_app) calls MigrateAsync() on startup. This:
  • Runs EF Core migrations to create the QualityDocDB schema in SQL Server and qualitydoc_audit tables in PostgreSQL
  • Seeds default users into SQL Server on first start
Watch the logs to confirm:
docker compose -f docker-compose.apps.yml logs -f qualitydoc-app
Default test users seeded on first start:
UsernamePasswordRole
adminAdmin123!Admin
gerenteGerente123!Manager
revisor1Revisor123!Reviewer
revisor2Revisor123!Reviewer
editorEditor123!Editor
viewerViewer123!Viewer
6

Open the application

Once all containers show healthy status, visit:
ModuleURL
.NET Document Managementhttp://localhost:5001
PHP Audit Portalhttp://localhost:8080
Search Service (API)http://localhost:3001
Node.js API (internal)http://localhost:5000

setup.ps1 Modes

setup.ps1 accepts a -Mode parameter to start only the layer you need. All modes automatically copy .env.example to .env if no .env file exists yet.
ModeWhat starts
-Mode All (default)Infra → Apps → Portal, with health-check polling between layers
-Mode InfraSQL Server, PostgreSQL, MongoDB only
-Mode Apps.NET app, Node.js API, Search Service, PHP portal
-Mode PortalPHP portal only
# Start only the databases
.\setup.ps1 -Mode Infra

# Start only the backend services (infra must already be running)
.\setup.ps1 -Mode Apps

# Start only the PHP portal
.\setup.ps1 -Mode Portal
The -ResetData flag runs docker compose -f docker-compose.infra.yml down -v before starting, permanently deleting sqlserver_data, postgres_data, and mongodb_data. All database content is wiped. Use this only to reset a development environment to a clean state.
.\setup.ps1 -Mode All -ResetData

Useful Operations

Check container status

# Infrastructure
docker compose -f docker-compose.infra.yml ps

# Applications
docker compose -f docker-compose.apps.yml ps

# Portal
docker compose -f docker-compose.portal.yml ps

Follow logs

# All infrastructure logs
docker compose -f docker-compose.infra.yml logs -f

# Specific container
docker compose -f docker-compose.apps.yml logs -f qualitydoc-app

Stop containers (keep data)

docker compose -f docker-compose.apps.yml down
docker compose -f docker-compose.infra.yml down

Reset data (delete volumes)

The command below permanently destroys all database volumes. There is no undo.
docker compose -f docker-compose.infra.yml down -v

Database Health Check Commands

Run these manually to verify a database is accepting connections:
docker exec qualitydoc_sqlserver \
  /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa \
  -P 'QualityDoc2026!' -Q 'SELECT 1' -No -C

Build docs developers (and LLMs) love