X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docker%2FMakefile;h=422fb1fe6fd773eb107e79902c8447615fe98f3f;hb=0f25f07824b73043257da30426013eba94f139b1;hp=2b58f2db5ca65bd66cd9312701d44c7beba53d5e;hpb=7dde0b73302613be132c41e1f28a42de555dc2b6;p=e-mobility-charging-stations-simulator.git diff --git a/docker/Makefile b/docker/Makefile index 2b58f2db..422fb1fe 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,8 +1,9 @@ PROJECT_NAME?=evse -NAME:=simulator +NAME:=charging-stations-simulator +SUBMODULES_INIT?=false DOCKER_ECR_ACCOUNT_ID?=166296450311 DOCKER_ECR_REGION?=eu-west-3 -DOCKER_ECR_REGISTRY_NAME?=ev_simulator +DOCKER_ECR_REGISTRY_NAME?=charging_stations_simulator DOCKER_ECR_TAG?=latest .PHONY: all @@ -12,10 +13,15 @@ default: all submodule-update: git submodule update --init --recursive -$(NAME): submodule-update +submodules-init= +ifeq '$(SUBMODULES_INIT)' 'true' + submodules-init += submodule-update +endif + +$(NAME): $(submodules-init) docker-compose -p $(PROJECT_NAME) up -d -$(NAME)-force: submodule-update +$(NAME)-force: $(submodules-init) docker-compose -p $(PROJECT_NAME) up -d --build --force-recreate all: $(NAME) @@ -29,7 +35,7 @@ clean-containers: clean: clean-containers clean-images docker-tag-ecr: - docker tag $(PROJECT_NAME)_$(NAME):$(DOCKER_ECR_TAG) $(DOCKER_ECR_ACCOUNT_ID).dkr.ecr.$(DOCKER_ECR_REGION).amazonaws.com/$(DOCKER_ECR_REGISTRY_NAME):$(DOCKER_ECR_TAG) + docker tag $(PROJECT_NAME)_$(NAME) $(DOCKER_ECR_ACCOUNT_ID).dkr.ecr.$(DOCKER_ECR_REGION).amazonaws.com/$(DOCKER_ECR_REGISTRY_NAME):$(DOCKER_ECR_TAG) docker-push-ecr: $(NAME)-force docker-tag-ecr aws ecr get-login-password --region $(DOCKER_ECR_REGION) | docker login --username AWS --password-stdin $(DOCKER_ECR_ACCOUNT_ID).dkr.ecr.$(DOCKER_ECR_REGION).amazonaws.com/$(DOCKER_ECR_REGISTRY_NAME)