# VPS Tracker: образ с GHCR + SQLite в ./data на хосте
services:
  app:
    image: ghcr.io/denozordec/vps-tracker:latest
    pull_policy: always
    ports:
      - "3001:3001"
    environment:
      PORT: "3001"
      RUNTIME: "fastify"
      NODE_ENV: production
      LOG_LEVEL: ${LOG_LEVEL:-info}
      AUTH_REQUIRED: ${AUTH_REQUIRED:-false}
      AUTH_JWT_SECRET: ${AUTH_JWT_SECRET:-dev-secret-change-me}
      AUTH_ISSUER: ${AUTH_ISSUER:-https://auth.shnt.top}
      AUTH_PORTAL_URL: ${AUTH_PORTAL_URL:-http://localhost:8080}
    volumes:
      - ./data:/app/data
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"
        tag: "{{.Name}}"

  # Раскомментируйте для локальной сборки вместо pull образа:
  # app-build:
  #   build:
  #     context: .
  #     dockerfile: Dockerfile
  #   ports:
  #     - "3001:3001"
  #   environment:
  #     PORT: "3001"
  #     RUNTIME: "express"
  #   volumes:
  #     - ./data:/app/data
  #   logging:
  #     driver: json-file
  #     options:
  #       max-size: "10m"
  #       max-file: "3"
