From 0902dd001e38372c9a6189bc3f6cf511d732a329 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 7 Aug 2020 12:03:45 +0100 Subject: [PATCH] Expose grafana --- ansible/roles/grafana/files/docker-compose.yml | 6 ++++-- terraform/jakehoward.tech.tf | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ansible/roles/grafana/files/docker-compose.yml b/ansible/roles/grafana/files/docker-compose.yml index 061429f..799d7ac 100644 --- a/ansible/roles/grafana/files/docker-compose.yml +++ b/ansible/roles/grafana/files/docker-compose.yml @@ -5,14 +5,16 @@ services: image: grafana/grafana:latest environment: - TZ=Europe/London - ports: - - 3000:3000 volumes: - ./grafana:/var/lib/grafana restart: unless-stopped networks: - default - grafana + labels: + - traefik.enable=true + - traefik.http.routers.grafana.rule=Host(`grafana.jakehoward.tech`) + - traefik.http.routers.grafana.tls.certresolver=le networks: grafana: diff --git a/terraform/jakehoward.tech.tf b/terraform/jakehoward.tech.tf index 652987d..782ed0c 100644 --- a/terraform/jakehoward.tech.tf +++ b/terraform/jakehoward.tech.tf @@ -147,3 +147,11 @@ resource "cloudflare_record" "jakehowardtech_contessa" { type = "A" ttl = 1 } + +resource "cloudflare_record" "jakehowardtech_grafana" { + zone_id = cloudflare_zone.jakehowardtech.id + name = "grafana" + value = vultr_server.casey.main_ip + type = "A" + ttl = 1 +}