This commit significantly refactors the Docker setup and application
configuration for improved robustness and flexibility.
Key changes include:
- Centralized Environment Variables:
- Default values for essential settings (database, email, cache, etc.)
are now defined in `django_project/settings.py` using `environ.Env`.
This provides sensible defaults and reduces reliance on `.env` files,
especially during Docker image builds.
- `docker-compose.yml` no longer defines environment variables directly
for `web` and `worker` services, deferring to `.env` and settings defaults.
- Dockerfile & Entrypoint Improvements:
- `DJANGO_SETTINGS_MODULE` is now exclusively set as an ENV in `Dockerfile`, instead of setting it in `entrypoint.sh`
- `entrypoint.sh` now conditionally appends `--static-path-mount`
only to the `granian` command, leveraging the upgraded Granian's
(v2.3.0+) ability to serve static files directly. The `STATIC_ROOT` is
dynamically fetched from Django settings.
- Dependency Updates:
- Upgraded `granian` from 2.2.5 to 2.3.1.
- Upgraded `click` from 8.2.0 to 8.2.1.
- `uv.lock` reflects these and other minor transitive dependency updates.
- Configuration Adjustments in `settings.py`:
- Add defaults for all env variables, and set to default local dev settings
- Introduced a `SCHEME` environment variable (defaulting to 'http')
used for `CSRF_TRUSTED_ORIGINS`, `META_SITE_PROTOCOL`,
`ACCOUNT_DEFAULT_HTTP_PROTOCOL`, etc.
- `TIME_ZONE` and various email settings (host, port, user, password, TLS)
are now configurable via environment variables with defaults.
- `CELERY_TIMEZONE` now defaults to the `TIME_ZONE` setting.
- Removed the unused `SCW_SECRET_KEY` variable (previously used for
EMAIL auth).
81 lines
2.1 KiB
TOML
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.3.1",
|
|
"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"]
|