git.emilymaier.net cloud / master Makefile
master

Tree @master (Download .tar.gz)

Makefile @masterraw · history · blame

all:
	docker build -t gcr.io/site-215815/git-ssh git-ssh
	docker build -t gcr.io/site-215815/git-nginx git-nginx
	docker build -t gcr.io/site-215815/git-klaus git-klaus
	docker build -t gcr.io/site-215815/dev dev
	docker build -t gcr.io/site-215815/prod prod

push:
	docker push gcr.io/site-215815/git-ssh
	docker push gcr.io/site-215815/git-nginx
	docker push gcr.io/site-215815/git-klaus
	docker push gcr.io/site-215815/dev
	id=$$(docker image inspect gcr.io/site-215815/prod:latest | jq -r ".[0].Id" | cut -d':' -f2); docker tag gcr.io/site-215815/prod:latest gcr.io/site-215815/prod:"$$id"
	docker push gcr.io/site-215815/prod
	id=$$(echo "        image: gcr.io/site-215815/prod:"$$(docker image inspect gcr.io/site-215815/prod:latest | jq -r ".[0].Id" | cut -d':' -f2)); sed -i '/image:/c\'"$$id" prod.yaml

dev-logs:
	kubectl logs deployment/dev > dev-logs.txt
	goaccess dev-logs.txt -o dev-logs.html --log-format=COMBINED
	firefox dev-logs.html

prod-logs:
	kubectl logs deployment/prod > prod-logs.txt
	goaccess prod-logs.txt -o prod-logs.html --log-format=COMBINED
	firefox prod-logs.html