🚀 Getting Started
Everything you need to run Stocks locally.
Prerequisites
| Requirement | Notes |
|---|---|
| .NET 10 SDK | Build and run the solution |
| Docker | SQL Server database and containerized services |
Running the database
The SQL Server database used for local development and tests is built from the sql/ folder:
1
2
3
cd sql
docker build . -t sql-server-db-test -f Build.Dockerfile
docker run -p 1433:1433 --name db -d sql-server-db-test
Running the full stack with Docker Compose
docker-compose.yml at the repository root builds and runs the API and worker alongside the database:
1
docker compose up --build
This starts:
| Service | Purpose |
|---|---|
stocks.apis.web.forintegration |
The API, exposed on ports 48000 (HTTP) and 48001 (HTTPS) |
stocks.worker |
The background worker |
sql-server-db |
The SQL Server database, exposed on port 1433 |
Building and testing locally
1
2
dotnet build Stocks.sln -c Debug
dotnet test -c Debug --no-build --no-restore
Integration tests require the SQL Server database above to be running.
See 🏗️ Architecture for an overview of how the projects fit together.