Organise Makefile

This commit is contained in:
Oliver Davies 2021-07-16 12:09:40 +01:00
parent 8cb1e849a7
commit d9e9a60d44

View file

@ -6,28 +6,30 @@ assets-watch:
npm run watch
build-images:
docker image build \
docker image build . \
--file tools/docker/images/Dockerfile \
--target=production \
--tag $(DOCKER_IMAGE_NAME):latest \
--tag $(DOCKER_IMAGE_NAME):$(DOCKER_TAG) \
.
--tag $(DOCKER_IMAGE_NAME):latest \
--target=production
deploy:
cd tools/deployment && ansible-playbook deploy.yml
destroy:
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose down --volumes --remove-orphans
disable:
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose down
enable:
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose up -d --build
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose up --detach --build
ps:
COMPOSE_PROJECT_NAME=$(COMPOSE_PROJECT_NAME) docker-compose ps
push-images:
docker image push $(DOCKER_IMAGE_NAME):latest
docker image push $(DOCKER_IMAGE_NAME):$(DOCKER_TAG)
docker image push $(DOCKER_IMAGE_NAME):latest
.PHONY: *