platform-codebase/features/seo/docker-compose.yml
2026-02-01 18:36:39 -08:00

84 lines
2.4 KiB
YAML
Executable file

# SEO Feature Stack
# Database services + SEO text generation service
#
# Run with: docker-compose up -d
# Or run seo-text-service locally: ./run-seo-service.sh
#
# NOTE: LLM inference uses lilith-llama-service (port 41221) via GPUBoss.
# Ollama is no longer used.
services:
# SEO Text Generation Service (port 8001)
# Uses lilith-llama-service for unique SEO content
seo-text-service:
build:
context: ${SEO_SERVICE_DIR:-~/Code/@packages/@ml/seo-service}
dockerfile: Dockerfile
container_name: lilith-seo-text-service
restart: unless-stopped
ports:
- '${SEO_SERVICE_PORT:-8001}:8001'
environment:
SEO_SERVICE_PORT: 8001
# lilith-llama-service endpoint (GPUBoss-coordinated)
LLAMA_SERVICE_URL: ${LLAMA_SERVICE_URL:-http://host.docker.internal:41221}
SEO_SERVICE_CACHE_URL: redis://seo-redis:6379/0
depends_on:
seo-redis:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8001/api/health']
interval: 30s
timeout: 10s
retries: 3
profiles:
- full # Only start with: docker-compose --profile full up
seo-postgres:
image: postgres:16-alpine
container_name: lilith-seo-postgres
restart: unless-stopped
ports:
- '${POSTGRES_PORT:-25436}:5432'
environment:
POSTGRES_USER: ${POSTGRES_USER:-lilith}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-seo_dev}
POSTGRES_DB: ${POSTGRES_DB:-lilith_seo}
volumes:
- seo-postgres-data:/var/lib/postgresql/data
- ./database/init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER:-lilith}']
interval: 10s
timeout: 5s
retries: 5
seo-redis:
image: redis:7.4-alpine
container_name: lilith-seo-redis
restart: unless-stopped
ports:
- '${REDIS_PORT:-26383}:6379'
volumes:
- seo-redis-data:/data
command:
- redis-server
- --appendonly
- "yes"
- --maxmemory
- "256mb"
- --maxmemory-policy
- "allkeys-lru"
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 3s
retries: 5
volumes:
seo-postgres-data:
name: lilith-${LILITH_ENV:-dev}-seo-postgres-data
seo-redis-data:
name: lilith-${LILITH_ENV:-dev}-seo-redis-data