-
Start the services (PostgreSQL + Redis):
docker compose up -dThis will create the following containers:
PostgreSQL:
- Container:
fin_app - Database:
fin_app - User:
fin_app - Password:
fin_app - Port:
5432
Redis:
- Container:
fin_redis - Port:
6379 - Version: Redis 7 (Alpine)
Check if the containers are running:
docker ps -a - Container:
-
Configure the connection strings in your
appsettings.json: To run the application locally:"ConnectionStrings": { "DefaultConnection": "Host=localhost;Port=5432;Database=fin_app;Username=fin_app;Password=fin_app" }, "ApiSettings": { "Redis": "localhost:6379" }
-
Verify everything is ok:
dotnet build -
Start the application:
dotnet run --project .\Fin.Api\
- The PostgreSQL container can be accessed via any PostgreSQL client on port
5432. - Entity Framework Core migrations create all necessary tables for all project domains.
- Redis is used for caching and sessions in the project.
- Default port:
6379 - Redis data is persisted in the
redis_datavolume - Health check configured to verify if the service is active
- The
dotnet buildcommand checks if the project compiles correctly. - The
dotnet runcommand starts the API. - Make sure both PostgreSQL and Redis are running before starting the application.