One server now, the same image and env vars for many later: point DJANGO_DATABASE_URL / DJANGO_REDIS_URL at central services, set a bucket, drop the db and redis services, run several web containers behind a load balancer. No code changes. The wildcard certificate is what shapes this. Subdomain tenancy needs *.rosterchief.app, and Let's Encrypt will not issue a wildcard over HTTP-01 -- only DNS-01 -- so Caddy is built with a DNS provider plugin and needs an API token. That single constraint is why the proxy is Caddy rather than the usual nginx+certbot. The image apt-installs libpango and friends, which is what WeasyPrint binds to. The PDF invoices that cannot render on a Mac without Homebrew work in the container by construction. Migrations are NOT run by the entrypoint: with more than one web container they would race, and a starting gunicorn worker is a bad place to discover a failed migration. Deploy runs them once, explicitly. Two things the local build check caught, either of which would have failed the image build at collectstatic (manifest storage treats a missing referenced file as fatal): - chart.js ended with a sourceMappingURL pointing at a .map we never vendored. Stripped, with an npm script so re-vendoring cannot bring it back. - The Tailwind INPUT file lived at static/src/app.css, inside the served static tree, so collectstatic collected it and then choked on its @import "tailwindcss". It belongs outside: it is a build input, not an asset. Now assets/app.css. Verified locally under gunicorn + WhiteNoise + manifest storage: pages serve and the CSS comes back hashed. The image itself is unverified -- there is no container runtime on this machine. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
23 lines
841 B
JSON
23 lines
841 B
JSON
{
|
|
"name": "rosterchief",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tailwindcss -i ./assets/app.css -o ./static/css/app.css --minify",
|
|
"watch": "tailwindcss -i ./assets/app.css -o ./static/css/app.css --watch",
|
|
"vendor:chart": "node -e \"const fs=require('fs');const s=fs.readFileSync('node_modules/chart.js/dist/chart.umd.js','utf8').split('\\n').filter(l=>!l.startsWith('//# sourceMappingURL=')).join('\\n');fs.writeFileSync('static/js/chart.js',s)\""
|
|
},
|
|
"devDependencies": {
|
|
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
|
"@fontsource-variable/roboto": "^5.2.10",
|
|
"@fontsource-variable/tourney": "^5.2.8",
|
|
"@fontsource/ubuntu": "^5.2.8",
|
|
"@tailwindcss/cli": "^4.1.0",
|
|
"daisyui": "^5.0.0",
|
|
"tailwindcss": "^4.1.0"
|
|
},
|
|
"dependencies": {
|
|
"chart.js": "^4.5.1"
|
|
}
|
|
}
|