dockerized atproto relay

chore: add grafana for monitoring

besaid.zone 4ced76e3 bc4cc0cb

verified
+1
.env.example
··· 1 + ENVIRONMENT=prod # can be "dev" as well 1 2 RELAY_LENIENT_SYNC_VALIDATION=true 2 3 RELAY_REPLAY_WINDOW=48h 3 4 RELAY_PERSIST_DIR=/data/relay/persist
+1
conf/Caddyfile
··· 10 10 } 11 11 12 12 reverse_proxy localhost:2470 13 + reverse_proxy localhost:3000 13 14 }
+4
conf/grafana.ini
··· 1 + [security] 2 + 3 + admin_user = admin 4 + admin_password = password1 # CHANGE THIS IF USING GRAFANA
+26
docker-compose.yml
··· 27 27 volumes: 28 28 - $PWD/conf:/etc/caddy 29 29 - caddy_data:/data 30 + # Uncomment grafana and prometheus before building container if you want to use these 31 + # grafana: 32 + # env_file: .env 33 + # image: grafana/grafana-oss 34 + # container_name: grafana 35 + # restart: unless-stopped 36 + # depends_on: 37 + # - prometheus 38 + # ports: 39 + # - "3000:3000" 40 + # networks: 41 + # - backend 42 + # volumes: 43 + # - ./conf/grafana.ini:/etc/grafana/grafana.ini 44 + # - ${HOME}/grafana-storage:/var/lib/grafana 45 + # prometheus: 46 + # image: prom/prometheus:latest 47 + # networks: 48 + # - backend 49 + # ports: 50 + # - "9090:9090" 51 + # volumes: 52 + # - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro 53 + # depends_on: 54 + # - relay 30 55 db: 31 56 env_file: .env 32 57 image: postgres:16-alpine ··· 46 71 volumes: 47 72 caddy_data: 48 73 caddy_config: 74 + grafana-storage: {} 49 75 50 76 networks: 51 77 backend:
+4
prometheus.yml
··· 1 + scrape_configs: 2 + - job_name: "relay" 3 + static_configs: 4 + - targets: ["relay:2471"]