title | description | author | app_file | sdk | sdk_version | python_version | tags | ||||
---|---|---|---|---|---|---|---|---|---|---|---|
Pickleball Tournament Court Allocation |
A web application to automatically schedule and allocate courts for pickleball tournaments |
Saurabh Nandedkar |
app.py |
gradio |
4.44.1 |
3.9 |
|
A smart court allocation system that helps tournament organizers efficiently schedule matches across multiple courts, considering various categories and time slots.
- Calculate courts needed based on total participants
- Automatic distribution of players into:
- Advanced Men's Doubles
- Mixed Doubles
- Amateur Categories
- Optional 35+ Category
- Optional Open Category
- Round-robin format calculations
- Group distribution visualization
- Detailed breakdown of participant categories
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Open the provided URL in your web browser
- Input the following parameters:
- Total number of participants
- Whether to include 35+ category
- Whether to include open category
- Click submit to see the detailed court allocation and tournament statistics
- Each match takes approximately 30 minutes
- Tournament duration is 8 hours
- Round-robin groups contain 4 teams each
- Advanced players make up 2/3 of total participants
- Among advanced players, 1/3 are women
This application is deployed using Docker Compose with Traefik as a reverse proxy, operating behind Cloudflare for SSL/TLS termination.
- Server with Docker and Docker Compose installed
- Domain name pointed to your server through Cloudflare
- GitHub repository secrets configured:
SERVER_HOST
: Deployment server hostname/IPSERVER_USERNAME
: Server SSH usernameSERVER_SSH_KEY
: Server SSH private key
- Ensure your domains are properly configured in Cloudflare:
your-app-domain.com
your-traefik-domain.com
- Enable Cloudflare proxy (orange cloud) for both domains
For local development and testing:
- Add the following entries to your
/etc/hosts
file:
127.0.0.1 courts.localhost
127.0.0.1 traefik.localhost
- Start the application in development mode:
# Start with Docker Compose Watch
docker compose -f docker-compose.local.yml watch
# Or start normally without watch mode
docker compose -f docker-compose.local.yml up -d
The application will be available at:
- Main application:
http://courts.localhost
- Traefik dashboard:
http://traefik.localhost
Development Features:
- Hot reload: Changes to Python files are synced immediately
- Auto rebuild: Changes to
requirements.txt
orDockerfile
trigger rebuilds - Ignored files: Git, cache, and environment files are excluded from syncing
- Container logs are preserved for debugging
# Clone the repository
git clone <repository-url> /opt/court-allocation
cd /opt/court-allocation
# Start the application
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the application
docker-compose down
The application will be available at:
- Main application:
http://your-app-domain.com
(HTTPS provided by Cloudflare) - Traefik dashboard:
http://your-traefik-domain.com
(HTTPS provided by Cloudflare)
-
Traefik Reverse Proxy:
- Domain-based routing
- Docker integration
- Load balancing
- Health checks
-
Cloudflare Integration:
- SSL/TLS termination
- DDoS protection
- Caching
- Analytics
-
Container Management:
- Automatic container restart
- Health monitoring
- Log rotation (max 3 files of 10MB each)
- Easy deployment commands
- SSL/TLS is handled by Cloudflare
- Internal communication uses HTTP
- Container security options are enabled
- Network isolation between containers