# GRAVITY DNS Only node (port mode)
# In IP variable, prefer using the real host IP, this determine the hostname of DNS node.
services:
  gravity:
    # Important for this to be static and unique
    container_name: gravity-dns-node-${IP}-${PORT}
    hostname: gravity-dns-node-${IP}-${PORT}
    image: ghcr.io/beryju/gravity:stable
    restart: unless-stopped
    network_mode: host
    volumes:
      - ${DATA_DIR}:/data
    environment:
      ADMIN_PASSWORD: ${PASSWORD}
    #   LOG_LEVEL: info
    # The default log level of info logs DHCP and DNS queries, so ensure
    # the logs aren't filling up the disk
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"