This guide walks you through running all B-Accesible backend services with a singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Alejandrin08/Hackathon-SPEI/llms.txt
Use this file to discover all available pages before exploring further.
docker compose up --build command.
Port reference
| Port | Service |
|---|---|
5000 | API Gateway (OcelotGateway) |
1433 | SQL Server 2022 |
7002 | Analytics Service |
5173 | Frontend — Vite dev server (run separately) |
8001 | AI Service — Python/uvicorn (run separately) |
Prerequisites
- Docker Desktop 24+ (or Docker Engine + Compose plugin)
- At least 4 GB of RAM allocated to Docker
- Ports
5000,1433, and7002available on your machine
Setup
Create the .env file
Create a
.env file in the backend/ directory with your secrets. Docker Compose reads this file automatically.Build images and start all services
Health checks
Once the stack is running, verify key endpoints:The .NET services wait for SQL Server to be reachable but do not use a formal healthcheck probe. If a service crashes immediately after starting, SQL Server may still be initializing. Wait 15–20 seconds and run
docker compose restart <service-name>.Docker Compose file
docker-compose.yml
Common operations
Stopping services
Rebuilding a single service
When you change code in one service, you can rebuild and restart only that container without touching the others:Viewing logs
Troubleshooting
Port already in use
Port already in use
If Docker reports that port To find what is using a port:
5000, 1433, or 7002 is already in use, either stop the conflicting process or change the host-side port mapping in docker-compose.yml:SQL Server container exits immediately
SQL Server container exits immediately
The most common cause is a password that does not meet SQL Server complexity requirements. The
SA_PASSWORD value 123SPEI may fail depending on the SQL Server version. Requirements:- At least 8 characters
- Contains uppercase letters (A–Z)
- Contains lowercase letters (a–z)
- Contains digits (0–9)
- Contains a special character (e.g.,
!,@,#)
SA_PASSWORD in docker-compose.yml and also update the ConnectionStrings environment variables in each dependent service to match the new password.Check the container logs for the exact error:Service cannot connect to SQL Server on startup
Service cannot connect to SQL Server on startup
The .NET services start immediately but SQL Server takes 15–30 seconds to finish initializing. If a service crashes before SQL Server is ready, restart it:For a permanent fix, add a
healthcheck and condition: service_healthy to the depends_on block for each service.Image build fails with a NuGet restore error
Image build fails with a NuGet restore error
This is usually a network issue during the first build. Retry:
Changes to code are not reflected after restart
Changes to code are not reflected after restart
Docker caches build layers. To force a full rebuild of a service:
