From 2d25ccb3dea2bab4e208849cae58039ddf26e14e Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger Date: Thu, 21 Jun 2018 15:42:36 -0700 Subject: [PATCH] spinning up required services in the makefile dev target (#192) fixes https://github.com/gomods/athens/issues/191 --- Makefile | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6cc281d2..77985606 100644 --- a/Makefile +++ b/Makefile @@ -1,27 +1,38 @@ +.PHONY: build build: cd cmd/proxy && buffalo build +.PHONY: run run: build ./athens - + +.PHONY: cli cli: go build -o athens ./cmd/cli +.PHONY: docs docs: cd docs && hugo +.PHONY: test test: cd cmd/proxy && buffalo test cd cmd/olympus && buffalo test +.PHONY: olympus-docker olympus-docker: docker build -t gopackages/olympus -f cmd/olympus/Dockerfile . +.PHONY: dev dev: - # TODO: spin up all the services :) - # need to create an umbrella service in - # the docker compose file that declares all the - # deps docker-compose -p athensdev up -d mysql + docker-compose -p athensdev up -d postgres + docker-compose -p athensdev up -d mongo + docker-compose -p athensdev up -d redis + docker-compose -p athensdev up -d minio echo "sleeping for a bit to wait for the DB to come up" sleep 5 + +.PHONY: dev-teardown +dev-teardown: + docker-compose -p athensdev down