services:
  delphi-db:
    build: .
    ports:
      - "8000:8000"
    environment:
      - SECRET_KEY=your-secret-key-here-change-this-in-production
      - DATABASE_URL=sqlite:///./delphi.db
    volumes:
      # Mount the database file so it persists between container restarts
      - ./delphi.db:/app/delphi.db
      # Mount data-import directory for file uploads
      - ./data-import:/app/data-import
      # Mount static files
      - ./static:/app/static
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s