Docker Compose stack for the AFK bot and portfolio site. Runs on a single VPS with automatic HTTPS via Caddy and Let's Encrypt.
| Service | Description |
|---|---|
caddy |
Reverse proxy, handles TLS termination |
grafana |
Dashboards and log explorer |
prometheus |
Metrics scraping from afkbot :9090 |
loki |
Log aggregation |
promtail |
Reads Docker container logs and ships to Loki |
afkbot |
Mineflayer AFK bot managing 16 accounts |
landing-page |
Next.js portfolio site |
- Docker and Docker Compose installed on the VPS
- DNS A records pointing to the VPS IP:
williamedwards.megrafana.williamedwards.me
- Clone all three repos alongside each other:
~/
afkbot/
infrastructure/
landing-page/
- Create a
.envfile in this directory:
DOMAIN=williamedwards.me
GRAFANA_PASSWORD=changeme
ADMIN_PASSWORD=changeme- Start the stack:
docker compose up -d- On first run, copy Microsoft auth tokens into the persistent volume so bots don't need to re-authenticate:
cp -r /root/.minecraft/nmp-cache/ /var/lib/docker/volumes/infrastructure_auth_cache/_data/# View logs for a service
docker compose logs -f afkbot
# Rebuild and restart a single service
docker compose up -d --build landing-page
# Restart everything
docker compose restart
# Stop everything
docker compose downAll state is stored in named Docker volumes so it survives container restarts and VPS reboots:
caddy_data— TLS certificatesgrafana_data— dashboards and data sourcesprometheus_data— metrics (30-day retention)loki_data— logsauth_cache— Microsoft OAuth tokens for the bots (/root/.minecraft)