version: "3.8"

# Production overrides for ZGZ Turismo Directus stack
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

services:
  postgres:
    ports: []  # no external port in production

  redis:
    ports: []  # no external port in production

  directus:
    ports:
      - "127.0.0.1:8056:8055"  # bind only to loopback; nginx proxies /zaragoza_backend
    environment:
      PUBLIC_URL: ${PUBLIC_URL:-https://clientes.deusens.com/zaragoza_backend}

      CACHE_STORE: redis
      CACHE_REDIS_HOST: redis
      CACHE_REDIS_PORT: 6379
      RATE_LIMITER_ENABLED: "true"
      RATE_LIMITER_STORE: redis
      RATE_LIMITER_REDIS_HOST: redis
      RATE_LIMITER_REDIS_PORT: 6379

      CORS_ORIGIN: "https://clientes.deusens.com"
      CORS_METHODS: GET,POST,PATCH,DELETE
      CORS_ALLOWED_HEADERS: Content-Type,Authorization

      LOG_STYLE: json

  nllb:
    ports: []  # no external port in production

  adminer:
    profiles:
      - never  # disabled in production
