Files
kakebo/compose.yaml
Andros Fenollosa 35ed611a8e Replace Tailwind CLI with Vite build pipeline
- Vite container builds CSS (Tailwind + DaisyUI + custom) with
  content hashing for cache busting
- django-vite resolves hashed asset URLs via manifest.json
- Remove CDN dependencies for Tailwind and DaisyUI
- Single CSS entry point in assets/css/main.css
- Vite runs as build step before Django starts
2026-03-23 08:37:22 +01:00

73 lines
1.5 KiB
YAML

services:
redis:
image: redis:7-alpine
restart: unless-stopped
expose:
- "6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
vite:
build:
context: ./
dockerfile: ./Dockerfiles/vite/Dockerfile
restart: "no"
entrypoint: sh -c "npm run build"
volumes:
- ./static:/app/static
- ./assets:/app/assets
- ./templates:/app/templates
- ./app:/app/app
- ./vite.config.js:/app/vite.config.js
- ./postcss.config.js:/app/postcss.config.js
- ./tailwind.config.js:/app/tailwind.config.js
django:
build: .
restart: unless-stopped
expose:
- "8000"
env_file:
- .env
volumes:
- .:/app
command: ./entrypoint.sh
depends_on:
redis:
condition: service_healthy
vite:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "python", "manage.py", "check"]
interval: 30s
timeout: 10s
retries: 3
nginx:
image: nginx:alpine
restart: unless-stopped
ports:
- "${NGINX_PORT:-8080}:80"
env_file:
- .env
depends_on:
django:
condition: service_healthy
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./staticfiles:/app/static:ro
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 30s
timeout: 10s
retries: 3
volumes:
redis_data: