pkmntrade.club/pyproject.toml
badbl0cks 6aa15d1af9
feat: Implement dynamic Gatekeeper proxy and enhance service health monitoring
- **Implemented Dynamic Gatekeeper (Anubis) Proxy:**
  - Introduced Anubis as a Gatekeeper proxy layer for services (`web`, `web-staging`, `feedback`, `health`).
  - Added `docker-gen` setup (`docker-compose_gatekeeper.template.yml`, `gatekeeper-manager`) to dynamically configure Anubis instances based on container labels (`enable_gatekeeper=true`).
  - Updated HAProxy to route traffic through the respective Gatekeeper services.

- **Enhanced Service Health Monitoring & Checks:**
  - Integrated `django-health-check` into the Django application, providing detailed health endpoints (e.g., `/health/`).
  - Replaced the custom health check view with `django-health-check` URLs.
  - Added `psutil` for system metrics in health checks.
  - Made Gatus configuration dynamic using `docker-gen` (`config.template.yaml`), allowing automatic discovery and monitoring of service instances (e.g., web workers).
  - Externalized Gatus SMTP credentials to environment variables.
  - Strengthened `docker-compose_core.yml` with a combined `db-redis-healthcheck` service reporting to Gatus.
  - Added explicit health checks for `db` and `redis` services in `docker-compose.yml`.

- **Improved Docker & Compose Configuration:**
  - Added `depends_on` conditions in `docker-compose.yml` for `web` and `celery` services to wait for the database.
  - Updated `ALLOWED_HOSTS` in `docker-compose_staging.yml` and `docker-compose_web.yml` to include internal container names for Gatekeeper communication.
  - Set `DEBUG=False` for staging services.
  - Removed `.env.production` from `.gitignore` (standardized to `.env`).
  - Streamlined `scripts/entrypoint.sh` by removing the call to the no-longer-present `/deploy.sh`.

- **Dependency Updates:**
  - Added `django-health-check>=3.18.3` and `psutil>=7.0.0` to `pyproject.toml` and `uv.lock`.
  - Updated `settings.py` to include `health_check` apps, configuration, and use `REDIS_URL` consistently.

- **Streamlined deployment script used in GHA:**
  - Updated the workflow to copy new server files and create a new `.env` file in the temporary directory before moving them into place.
  - Consolidated the stopping and removal of old containers into a single step for better clarity and efficiency.
  - Reduce container downtime by rearranging stop/start steps.
2025-05-23 00:15:19 -07:00

81 lines
2.1 KiB
TOML

[build-system]
requires = ["setuptools>=80", "setuptools-scm>=8", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "pkmntrade-club"
version = "0.1.0"
description = "A django project for trading Pokémon TCG Pocket Cards"
readme = "README.md"
requires-python = ">=3.12"
license = "MIT"
license-files = ["LICENSE"]
authors = [
{ name = "badblocks", email = "rob@badblocks.email" },
]
classifiers = [
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
dependencies = [
"asgiref==3.8.1",
"celery>=5.5.2",
"certifi==2022.12.7",
"cffi==1.17.1",
"charset-normalizer==3.0.1",
"crispy-tailwind==1.0.3",
"cryptography==39.0.1",
"defusedxml==0.7.1",
"django==5.1",
"django-allauth==65.0.2",
"django-browser-reload==1.17.0",
"django-celery-beat>=2.8.1",
"django-crispy-forms==2.3",
"django-daisy==1.0.13",
"django-debug-toolbar==4.4.6",
"django-environ==0.12.0",
"django-health-check>=3.18.3",
"django-linear-migrations>=2.17.0",
"django-meta==2.4.2",
"django-tailwind-4[reload]==0.1.4",
"django-widget-tweaks==1.5.0",
"gevent==25.4.1",
"granian==2.2.5",
"gunicorn==23.0.0",
"idna==3.4",
"oauthlib==3.2.2",
"packaging==23.1",
"pillow>=11.2.1",
"playwright==1.52.0",
"psutil>=7.0.0",
"psycopg==3.2.3",
"psycopg-binary==3.2.3",
"pycparser==2.21",
"pyjwt==2.6.0",
"python3-openid==3.2.0",
"redis>=6.1.0",
"requests==2.28.2",
"requests-oauthlib==1.3.1",
"sqlparse==0.4.3",
"typing-extensions==4.9.0",
"urllib3==1.26.14",
"whitenoise==6.7.0",
]
[project.scripts]
pkmntrade-manage = "manage:main"
[project.urls]
Homepage = "https://pkmntrade.club"
[tool.setuptools.packages.find]
where = ["src"]