TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/J0S3-LEON/pf_pruebasAseguramientoCalid_SDD/llms.txt
Use this file to discover all available pages before exploring further.
compose.yml at the repository root orchestrates three services — a PostgreSQL 18 database, the NestJS backend, and the Next.js frontend — all running inside isolated containers on a shared private network. This is the recommended way to reproduce the full application stack locally without installing Node.js or PostgreSQL on your host machine. All inter-service communication happens over an internal Docker network; only the frontend is reachable from your browser.
Services overview
| Service | Image / Build | Internal port | External access |
|---|---|---|---|
db | postgres:18-alpine | 5432 | Not exposed — internal network only |
backend | Built from apps/backend/Dockerfile | 3001 | Not exposed — internal network only |
frontend | Built from apps/frontend/Dockerfile | 3000 | http://localhost:3000 |
Network architecture
All three services are attached to a Docker network declared withinternal: true. This means no container can initiate outbound internet connections through this network, and neither db nor backend accepts traffic from outside the Docker environment. The frontend is the sole entry point for external traffic — matching the production topology where a reverse proxy or platform edge terminates public requests and forwards them to the frontend only.
Volume and data persistence
PostgreSQL 18 stores its data directory at/var/lib/postgresql/18/docker inside the container — a path change introduced in PostgreSQL 18. For this reason the named volume mindflow_pgdata is mounted at /var/lib/postgresql (the parent directory), not at /var/lib/postgresql/data as was conventional through PostgreSQL 17. This ensures data persists across container restarts and remains compatible with future minor-version upgrades.
Starting the stack
Verify configuration
Before building anything, confirm that Docker Compose can parse Review the output for any missing variables. At a minimum, ensure
compose.yml and that all variable substitutions resolve correctly:DATABASE_URL, JWT_SECRET, FRONTEND_URL, and AUTH_SECRET are set in your root .env file. See the Environment Variables reference for details.Build the images
Build the backend and frontend Docker images from source. Docker will use the multi-stage
Dockerfile in each application directory with the repo root as the build context:Start all services
Start all three containers in detached mode. Docker Compose will wait for the
db health check to pass before starting the backend, and will start the frontend after the backend is running:Run database migrations
Apply Prisma migrations against the containerised PostgreSQL instance. This step is required on first startup and after any schema change:
Follow the logs
Watch the live log output from both the backend and frontend to confirm startup completed without errors:Press
Ctrl+C to stop tailing the logs without stopping the containers.Open the application
Navigate to http://localhost:3000 in your browser. The frontend proxies API requests to
http://backend:3001/api/v1 over the internal network.compose.yml — services section
Useful commands
| Command | Description |
|---|---|
docker compose down | Stop and remove all containers (data volume is preserved) |
docker compose down -v | Stop and remove containers and the data volume |
docker compose exec backend <cmd> | Run a command inside the running backend container |
docker compose ps | Show the status of all services |
docker compose build --no-cache | Force a full rebuild without the layer cache |