solventum-image-metadata/docker-compose.fastapi.yml
SamoilenkoVadym 5b06af283f fix(docker): make Excel lookup file optional in docker-compose
- Comment out Excel file volume mount by default
- Excel lookup will be disabled if file not present
- Prevents deployment error when file doesn't exist
- Users can uncomment the line if they have the Excel file

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-02-09 13:34:03 +00:00

117 lines
3 KiB
YAML

version: '3.9'
services:
# Redis for session storage
redis:
image: redis:7-alpine
container_name: oliver-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
networks:
- oliver-network
# PostgreSQL database (optional - can use SQLite)
postgres:
image: postgres:15-alpine
container_name: oliver-postgres
restart: unless-stopped
environment:
POSTGRES_DB: oliver_metadata
POSTGRES_USER: oliver
POSTGRES_PASSWORD: ${DB_PASSWORD:-changeme}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U oliver"]
interval: 10s
timeout: 3s
retries: 3
networks:
- oliver-network
# FastAPI Backend
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: oliver-backend
restart: unless-stopped
environment:
# Database - use SQLite by default (simpler for migration)
DATABASE_URL: sqlite+aiosqlite:///./data/oliver_metadata.db
# Or use PostgreSQL:
# DATABASE_URL: postgresql+asyncpg://oliver:${DB_PASSWORD:-changeme}@postgres:5432/oliver_metadata
# Redis
REDIS_URL: redis://redis:6379/0
# Security
SECRET_KEY: ${SECRET_KEY:-please-change-this-secret-key-in-production}
# OpenAI (for AI metadata generation)
OPENAI_API_KEY: ${OPENAI_API_KEY}
AI_MODEL: ${AI_MODEL:-gpt-4o-mini}
MAX_TOKENS: ${MAX_TOKENS:-500}
TEMPERATURE: ${TEMPERATURE:-0.5}
# Microsoft SSO (optional)
AZURE_CLIENT_ID: ${AZURE_CLIENT_ID}
AZURE_CLIENT_SECRET: ${AZURE_CLIENT_SECRET}
AZURE_TENANT_ID: ${AZURE_TENANT_ID}
REDIRECT_URI: ${REDIRECT_URI:-http://localhost:8000/auth/microsoft/callback}
# Debugging
DEBUG: ${DEBUG:-false}
# Upload directory
UPLOAD_DIR: /app/uploads
volumes:
# Persistent storage for uploads
- ./backend/uploads:/app/uploads
# Persistent database (SQLite)
- ./backend/data:/app/data
# Persistent templates
- ./backend/output:/app/output
# Excel lookup file (optional - comment out if file doesn't exist)
# - ./Celum ID to Adobe Asset Path Mapping Spreadsheet (1).xlsx:/app/Celum ID to Adobe Asset Path Mapping Spreadsheet (1).xlsx:ro
ports:
- "${BACKEND_PORT:-5001}:8000"
depends_on:
redis:
condition: service_healthy
networks:
- oliver-network
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
redis-data:
driver: local
postgres-data:
driver: local
networks:
oliver-network:
driver: bridge