Skip to content

Commit

Permalink
Merge pull request #18 from ministryofjustice/ND-168-imap-dev-ops-mon…
Browse files Browse the repository at this point in the history
…itor-product-update-docker-flag

Amend Makefile - docker platform flag
  • Loading branch information
Stephen James authored Mar 13, 2024
2 parents ee13a2a + 22bd0cc commit 8d841e9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#!make
include .env
ifneq (,$(wildcard ./.env))
include .env
endif
export

build:
.DEFAULT_GOAL := help

.PHONY: build
build: ## Get blackbox_exporter image from GitHub and build
./build.sh

run: build
.PHONY: run
run: ## Get blackbox_exporter image from GitHub, build and run against target in .env
$(MAKE) build
docker run -it -e PROM_USER=$$PROM_USER -e PROM_PASS=$$PROM_PASS -e PROM_TARGET=$$PROM_TARGET -e REMOTE_WRITE_URL=$$REMOTE_WRITE_URL app-reachability:latest

.PHONY: build run
help:
@grep -h -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ tar -xzvf tmp/bb.tar.gz -C ./tmp
mkdir -p build
mv ./tmp/blackbox_exporter-0.19.0.linux-amd64/blackbox_exporter ./build

docker build -t app-reachability .
docker build --platform linux/amd64 -t app-reachability .
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3'
version: "3"

networks:
monitor-net:
Expand All @@ -7,10 +7,10 @@ networks:
services:
reachability:
image: ghcr.io/ministryofjustice/staff-infrastructure-monitoring-app-reachability:main
platform: linux/x86_64
container_name: app-reachability
environment:
- PROM_USER= # basic auth username for prometheus
- PROM_PASS= # basic auth password for prometheus
- PROM_TARGET= # full url of http endpoint for monitoring
- REMOTE_WRITE_URL= # url for prometheus/thanos remote write

0 comments on commit 8d841e9

Please sign in to comment.