This is a project I created to troll my friend Barry. He's a huge Padres fan, and I'm a huge Dodgers fan.
The site can be found here
It answers one simple question:
Does Fernando Tatis Jr have an error today?
It will return either Yes or No
And it has a silly image of a throw that Tatis is making.
If you're a Padre fan you look at it and believe he's making an unbelievable throw to get someone out
If you're not, you know that Tatis is forking up the throw :)
The easiest way to get started is using Docker Compose:
-
Clone the repository
-
Copy the example environment file:
cp .env.example .env
Note: The
.env.examplefile is configured for docker-compose withDATABASE_URLpointing to thedbservice. If you're running the app without Docker, change the host fromdbtolocalhostin your.envfile. -
Start the services:
docker-compose up
-
The application will be available at http://localhost:8000
The Docker setup includes:
- Django development server with live code reloading
- PostgreSQL 16 database
- Automatic database migrations on startup
- Volume mounts for persistent data
- Environment variables loaded from
.envfile
To stop the services:
docker-compose downTo rebuild after dependency changes:
docker-compose up --buildIf you prefer not to use Docker:
- Install Python 3.14+
- Install dependencies:
uv pip install -e . - Set up environment variables (create a
.envfile or export them) - Run migrations:
python manage.py migrate
- Start the development server:
python manage.py runserver
This application is ready for deployment to Coolify:
- In Coolify, create a new application from this Git repository
- Coolify will automatically detect and use the Dockerfile
- In Coolify's environment variables section, configure the following:
DATABASE_URL: Your production PostgreSQL connection string (Coolify can provision this)- Example:
postgres://user:password@your-db-host:5432/tatis_prod - If using Coolify's managed PostgreSQL, it will inject this automatically
- Example:
SECRET_KEY: Django secret key (generate a secure one)DEBUG=FalseALLOWED_HOSTS: Your domain name(s) (e.g.,yourdomain.com,www.yourdomain.com)SECURE_SSL_REDIRECT=TrueSESSION_COOKIE_SECURE=TrueCSRF_COOKIE_SECURE=TrueSECURE_HSTS_SECONDS=31536000SECURE_HSTS_INCLUDE_SUBDOMAINS=TrueSECURE_HSTS_PRELOAD=TrueSECURE_PROXY_SSL_HEADER=HTTP_X_FORWARDED_PROTO,https
Important: Coolify injects environment variables directly into the container at runtime. Do NOT create a .env file in production - Coolify handles all environment configuration through its web interface. The .env.example file is only for local development reference.
The application includes:
- Health check endpoint at
/health/for Coolify monitoring - Automatic database migrations on container startup
- Static file collection during build
- Gunicorn as the production WSGI server
- Coolify can provision a PostgreSQL database and automatically inject the
DATABASE_URL - Or you can connect to an external database by setting
DATABASE_URLmanually - The app uses django-environ to read the database connection from
DATABASE_URL
pytest # Run all tests
pytest --cov # Run with coverage
pytest --last-failed # Run only failed testsprek run --all-files # Run pre-commit hooks
ruff format . # Format code
ruff check --fix . # Lint and fix
djhtml . # Format Django templates
ty # Type checkingpython manage.py migrate # Run migrations
python manage.py makemigrations # Create migrations
python manage.py loaddata fixture/*.json # Load fixtures (if exist)