This repository contains the configuration for a complete LGTM (Loki, Grafana, Tempo, Mimir/Prometheus) observability stack, designed to be deployed on Coolify.
It includes services for log aggregation, metrics, traces, and visualization, with a secure, public-facing endpoint for telemetry data ingestion.
- Grafana: The central dashboard for visualizing all your logs, metrics, and traces.
- Loki: For collecting and querying logs.
- Tempo: For collecting and querying traces.
- Prometheus: For collecting and querying metrics.
- Alloy: The collector that receives OpenTelemetry data (logs, metrics, traces) and forwards it to the appropriate backend service.
- PostgreSQL: The database backend for Grafana.
-
Clone the Repository:
git clone <your-repository-url> cd automatearmy-lgtm-stack
-
Configure Environment Variables:
- Rename the
.env.examplefile to.env. - Open the
.envfile and fill in the required values. SERVICE_FQDN_*: Set the public URLs for Grafana and Alloy. These will be the domains you point to your Coolify instance.- Passwords: Set strong passwords for Grafana and PostgreSQL.
- GCS Credentials: Fill in your Google Cloud Storage bucket name and the full JSON for your service account key.
ALLOY_BASIC_AUTH: Generate a credential string for your public Alloy endpoint using thehtpasswdutility:Copy the entire output (e.g.,# Example for user 'my-app' and password 'super-secret' htpasswd -nbB my-app super-secretmy-app:$2y$...) and paste it as the value forALLOY_BASIC_AUTH.
- Rename the
-
Deploy to Coolify:
- Point your Coolify instance to this repository.
- Coolify will detect the
docker-compose.ymlfile and automatically deploy the entire stack. - Ensure your domain's DNS records are pointing to your Coolify server's IP address.
- Grafana Dashboard:
https://your-grafana-domain.com(as defined in.env) - Alloy OTLP Ingestion Endpoint:
https://your-alloy-domain.com(as defined in.env)