services:
  xiaobai-review:
    build:
      context: .
      dockerfile: Dockerfile
    image: xiaobai-review:latest
    container_name: xiaobai-review
    ports:
      - "0.0.0.0:8765:8765/tcp"
    env_file:
      - ./.env
    environment:
      APP_ENCRYPTION_KEY: "${APP_ENCRYPTION_KEY:?APP_ENCRYPTION_KEY must be set in .env}"
      TZ: Asia/Shanghai
      PYTHONUTF8: "1"
    volumes:
      - type: bind
        source: ./data
        target: /app/data
    restart: unless-stopped
    init: true
    read_only: true
    tmpfs:
      - /tmp:size=64m,mode=1777
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    stop_grace_period: 30s
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"
