diff --git a/docker-compose/Makefile b/docker-compose/Makefile index c44f11a198f635c6140e7be6ff373566351f69fa..686f88f9e4887039cbe5206a5a88ecb8df9aed8c 100644 --- a/docker-compose/Makefile +++ b/docker-compose/Makefile @@ -29,6 +29,8 @@ ifeq (start,$(firstword $(MAKECMDGOALS))) SERVICE_TARGET = true else ifeq (stop,$(firstword $(MAKECMDGOALS))) SERVICE_TARGET = true +else ifeq (restart,$(firstword $(MAKECMDGOALS))) + SERVICE_TARGET = true else ifeq (build,$(firstword $(MAKECMDGOALS))) SERVICE_TARGET = true else ifeq (build-nocache,$(firstword $(MAKECMDGOALS))) @@ -122,7 +124,7 @@ DOCKER_COMPOSE_ARGS := DISPLAY=$(DISPLAY) \ CONTAINER_EXECUTION_UID=$(shell id -u) -.PHONY: up down minimal start stop status clean pull help +.PHONY: up down minimal start stop restart build build-nocache status clean pull help .DEFAULT_GOAL := help pull: ## pull the images from the Docker hub @@ -161,6 +163,11 @@ start: up ## start a service (usage: make start <servicename>) stop: ## stop a service (usage: make stop <servicename>) $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) stop $(SERVICE) + $(DOCKER_COMPOSE_ARGS) docker-compose $(COMPOSE_FILE_ARGS) rm -f $(SERVICE) + +restart: ## restart a service (usage: make restart <servicename>) + make stop $(SERVICE) # cannot use dependencies, as that would allow start and stop to run in parallel.. + make start $(SERVICE) attach: ## attach a service to an existing Tango network $(DOCKER_COMPOSE_ARGS) docker-compose $(ATTACH_COMPOSE_FILE_ARGS) up -d $(SERVICE)