- Python 73.5%
- Just 8%
- Dockerfile 7.1%
- HTML 7%
- Shell 4.4%
Bumps the github-actions group with 1 update: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).
Updates `astral-sh/setup-uv` from 10.3.2 to 10.3.3
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](
|
||
|---|---|---|
| .github | ||
| content | ||
| tatisjr | ||
| templates | ||
| .coveragerc | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| .isort.cfg | ||
| .pre-commit-config.yaml | ||
| conftest.py | ||
| docker-compose.host-db.yml | ||
| docker-compose.yaml | ||
| docker-compose.yml | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| generate_diagram.py | ||
| justfile | ||
| LICENSE | ||
| manage.py | ||
| pyproject.toml | ||
| pytest.ini | ||
| README.md | ||
| requirements.txt | ||
| setup.cfg | ||
| uv.lock | ||
| zizmor.yml | ||
Tatis
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 :)
Development Setup
Using Docker (Recommended)
The easiest way to get started is using Docker Compose:
-
Clone the repository
-
Copy the example environment file:
cp .env.example .envNote: 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 down
To rebuild after dependency changes:
docker-compose up --build
Traditional Setup (Without Docker)
If 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
Production Deployment
Deploying to Coolify
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
Database Connection
- 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
Development Commands
Testing
pytest # Run all tests
pytest --cov # Run with coverage
pytest --last-failed # Run only failed tests
Code Quality
prek run --all-files # Run pre-commit hooks
ruff format . # Format code
ruff check --fix . # Lint and fix
djhtml . # Format Django templates
ty # Type checking
Database
python manage.py migrate # Run migrations
python manage.py makemigrations # Create migrations
python manage.py loaddata fixture/*.json # Load fixtures (if exist)