version: '3.8'

services:
  lastwebnovel:
    build: .
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - NODE_OPTIONS=--max-old-space-size=512
    volumes:
      - ../botasaurus/content/novels:/app/content/novels:ro
      - ../botasaurus/public/images:/app/public/images:ro
    restart: unless-stopped
    # Resource limits for 2vCPU VPS
    deploy:
      resources:
        limits:
          cpus: '1.5'
          memory: 1G
        reservations:
          cpus: '1'
          memory: 512M
