Skip to main content
This guide provides detailed instructions for installing and configuring the Tournament Management App for local development and production deployment.

System Requirements

For Local Development

  • .NET 8.0 SDK or higher
  • SQLite (included with .NET)
  • Visual Studio Code or Visual Studio 2022 (recommended)
  • Git for version control

For Docker Deployment

  • Docker 20.10 or higher
  • Docker Compose 1.29 or higher
  • Minimum 2GB RAM available
  • Minimum 1GB disk space

Installation Methods

Docker Installation

Recommended for quick setup and production deployment

Local Development

Best for development and debugging

Docker Installation

Docker provides the simplest way to run the application with all dependencies included.
1

Install Docker

Download and install Docker Desktop for your operating system:Verify installation:
2

Clone the Repository

3

Review Docker Configuration

The docker-compose.yml file configures the application:
docker-compose.yml
The application runs on port 80 inside the container and is mapped to port 5000 on your host machine.
4

Build and Start

This command will:
  • Build the application using the multi-stage Dockerfile
  • Install .NET EF Core tools
  • Create the SQLite database at /app/Torneo.db
  • Run database migrations for both main and identity contexts
  • Publish the application
  • Start the container in detached mode
First build may take 5-10 minutes as Docker downloads base images and builds the application.
5

Verify Installation

Check container status:
Check application logs:
Test the application:

Docker Build Process

The Dockerfile uses a multi-stage build for optimization:
Dockerfile

Local Development Installation

For development, debugging, and contributing to the project:
1

Install .NET SDK

Download and install .NET 8.0 SDK:Verify installation:
Expected output: 8.0.x or higher
2

Clone the Repository

3

Restore Dependencies

Navigate to the solution directory and restore NuGet packages:
This installs all required dependencies including:
  • ASP.NET Core Identity
  • Entity Framework Core
  • SQLite provider
  • Health checks
  • Data protection libraries
4

Configure Database

Set the database connection string:
The database file will be created automatically in the current directory when you first run migrations.
5

Run Database Migrations

Apply migrations to create the database schema:
If dotnet ef is not found, install it globally:
6

Run the Application

Start the development server:
Or with hot reload for development:
The application will start on:
  • HTTP: http://localhost:5000
  • HTTPS: https://localhost:5001 (with dev certificate)

Project Structure

The application follows a modular architecture:

Key Dependencies

The application uses the following NuGet packages:

Frontend Project

Torneo.App.Frontend.csproj

Identity Configuration

The application includes ASP.NET Core Identity with the following settings:
Program.cs

Configuration Options

Environment Variables

Configure the application using environment variables:

Application Settings

Edit appsettings.json for additional configuration:
appsettings.json

Development Settings

For development-specific configuration, edit appsettings.Development.json:
appsettings.Development.json

Database Configuration

The application uses SQLite with Entity Framework Core:
DataContext.cs

Database Entities

The database includes the following tables:
  • Municipios: Municipalities where teams are located
  • DirectoresTecnicos: Technical directors (coaches)
  • Equipos: Tournament teams
  • Jugadores: Players registered to teams
  • Partidos: Matches between teams
  • Posiciones: Tournament standings

Health Checks

The application includes health check endpoints:
Program.cs
Access health status:

IDE Configuration

Visual Studio Code

Recommended extensions:
  • C# Dev Kit by Microsoft
  • C# by Microsoft
  • .NET Core Test Explorer
  • Docker by Microsoft
Launch configuration (.vscode/launch.json):

Visual Studio 2022

  1. Open Torneo.App.sln
  2. Set Torneo.App.Frontend as startup project
  3. Press F5 to run with debugging

Production Deployment

Docker Production Build

For production deployment with Docker:

Manual Deployment

For manual deployment to a server:

Troubleshooting

Common Issues

Change the port in docker-compose.yml or use --urls flag:
Ensure:
  • dotnet-ef tools are installed
  • DATABASE_CONNECTION_STRING is set correctly
  • Directory has write permissions
Recreate the database:
Clear NuGet cache and restore:
Clear Docker cache and rebuild:

Logs and Debugging

View application logs:
Enable detailed logging: Edit appsettings.json:

Next Steps

After installation:

Quickstart Guide

Create your first team and explore features

Configuration

Customize application settings

API Reference

Learn about repository interfaces

GitHub

View source code and contribute