# Purpose: every setting the Part 23 front door and monitoring stack read. Copy this file # to `.env` beside compose-monitoring.yaml and fill in the empty lines. Nothing # here is a secret except the Grafana admin password, which you generate rather # than copy, and which is the only reason this file must never be committed. # Platform: all # Minimum memory: 8 GB # Assumes: `cp env-example.txt .env` and then an editor. Docker Compose reads `.env` # automatically from the directory you run it in; the shell scripts in this part # read it with `set -a; . ./.env; set +a`. # ------------------------------------------------------------- what the stack listens on # Prometheus and Grafana stay on the loopback address. They are operator tools, they hold # a picture of everything your machine does, and there is no reason for anything on the # network to reach them directly. Put them behind the same front door as the gateway if # you want them from another machine. MONITORING_HOST=127.0.0.1 PROMETHEUS_PORT=9090 GRAFANA_PORT=3000 # The Grafana administrator password. Generate one with: openssl rand -hex 16 # Grafana's Docker page documents GF_SECURITY_ADMIN_PASSWORD as the environment variable # for this setting, and GF_SECURITY_ADMIN_PASSWORD__FILE for reading it from a file. # Leave this empty and Grafana starts with its own default, which is the single most # common way a home dashboard ends up readable by the whole house. GRAFANA_ADMIN_PASSWORD= # ------------------------------------------------------------------ what gets scraped # The gateway from Part 9. These are the ports its .env published; change them here if # you changed them there. Prometheus reaches host services through host.docker.internal, # which compose-monitoring.yaml maps to the host gateway. GATEWAY_PORT=4000 SWAP_PORT=9292 # The engines. llama-server needs --metrics for its endpoint to exist at all; vLLM and # SGLang publish theirs on the same port as the API. LLAMA_SERVER_PORT=8080 VLLM_PORT=8000 SGLANG_PORT=30000 # The exporters. node exporter's default port is 9100 and the DCGM exporter's is 9400, # both from their own documentation. The two exporters this part ships are given the next # free numbers so that nothing collides on a machine running more than one. NODE_EXPORTER_PORT=9100 DCGM_EXPORTER_PORT=9400 ROCM_EXPORTER_PORT=9401 MAC_EXPORTER_PORT=9402 # ---------------------------------------------------------------------------- images # None of these four is in this course's version table, so the course does not pin them # for you: it has not checked them on the lab machines. Read the current release tag on # each project's own releases page, write it here in place of `latest` before your first # run, and record what you chose in the changelog that Part 23's fifth lesson asks you to # keep. `latest` is a moving target and moving targets are how a stack that worked in the # morning stops working in the afternoon. # # Once the stack matters, replace the tag with a digest. Docker's documentation describes # pulling by digest as specifying exactly which version of an image to pull, so that the # image you run today is the image you ran yesterday. Read a pulled image's digest with: # docker image inspect --format '{{index .RepoDigests 0}}' PROMETHEUS_IMAGE=prom/prometheus:latest GRAFANA_IMAGE=grafana/grafana:latest NODE_EXPORTER_IMAGE=quay.io/prometheus/node-exporter:latest # NVIDIA's installation guide writes this image as # nvcr.io/nvidia/k8s/dcgm-exporter:${DCGM_EXPORTER_TAG} # and does not publish a moving tag to fill in for you. Look the tag up on NGC and write # the whole reference here. The service that uses it sits behind a Compose profile, so the # stack starts without it on the tracks that have no NVIDIA GPU. DCGM_EXPORTER_IMAGE= # ------------------------------------------------------------------ the front door # Only needed if you put NGINX in front of the gateway. The name is whatever you gave the # machine in your own DNS or hosts file; home.arpa is the domain reserved for exactly this # purpose, so it is what the shipped configuration uses as an example. FRONT_SERVER_NAME=gateway.home.arpa FRONT_TLS_CERT=/etc/ssl/local/gateway.crt FRONT_TLS_KEY=/etc/ssl/local/gateway.key # ------------------------------------------------------------------------- the estate # Where estate-manifest.py and backup-estate.sh look. Absolute paths, no trailing slash. MODELS_DIR= GATEWAY_DIR= BACKUP_DIR=