networks:
  1panel-network:
    external: true

services:
  policr-mini:
    image: gramoss/policr-mini:20250731
    container_name: ${CONTAINER_NAME}
    labels:
      createdBy: "Apps"
    restart: always
    networks:
      - 1panel-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}
    volumes:
      - ${POLICR_MINI_ROOT_PATH}/assets:/_assets
    environment:
      - TZ=Asia/Shanghai
      - POLICR_MINI_BOT_ASSETS_PATH=/_assets
      - POLICR_MINI_SERVER_PORT=${PANEL_APP_PORT_HTTP}
      - POLICR_MINI_SERVER_ROOT_URL=${POLICR_MINI_SERVER_ROOT_URL}
      - POLICR_MINI_BOT_NAME=${POLICR_MINI_BOT_NAME}
      - POLICR_MINI_BOT_OWNER_ID=${POLICR_MINI_BOT_OWNER_ID}
      - POLICR_MINI_DATABASE_URL="ecto://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABSE}"
      - POLICR_MINI_DATABASE_POOL_SIZE=${POLICR_MINI_DATABASE_POOL_SIZE:-10}
      - POLICR_MINI_SERVER_SECRET_KEY_BASE=${POLICR_MINI_SERVER_SECRET_KEY_BASE}
      - POLICR_MINI_BOT_TOKEN=${POLICR_MINI_BOT_TOKEN}
      - POLICR_MINI_BOT_WORK_MODE=${POLICR_MINI_BOT_WORK_MODE:-polling}
      - POLICR_MINI_BOT_GRID_CAPTCHA_INDI_WIDTH=${POLICR_MINI_BOT_GRID_CAPTCHA_INDI_WIDTH:-180}
      - POLICR_MINI_BOT_GRID_CAPTCHA_INDI_HEIGHT=${POLICR_MINI_BOT_GRID_CAPTCHA_INDI_HEIGHT:-120}
      - POLICR_MINI_BOT_GRID_CAPTCHA_WATERMARK_FONT_FAMILY=${POLICR_MINI_BOT_GRID_CAPTCHA_WATERMARK_FONT_FAMILY:-Lato}
      - POLICR_MINI_BOT_AUTO_GEN_COMMANDS=${POLICR_MINI_BOT_AUTO_GEN_COMMANDS:-true}
      - POLICR_MINI_BOT_MOSAIC_METHOD=${POLICR_MINI_BOT_MOSAIC_METHOD:-spoiler}
      - POLICR_MINI_UNBAN_METHOD=${POLICR_MINI_UNBAN_METHOD:-until_date}
      - POLICR_MINI_OPTS=${POLICR_MINI_OPTS}
