repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(ci): add ocpp-server code linter check
[e-mobility-charging-stations-simulator.git]
/
docker
/
Makefile
diff --git
a/docker/Makefile
b/docker/Makefile
index d3eefbc01330c2219f9bb6267d57619186f307cc..d4be3df46b80ef943563d4d811b1fa958d7ba102 100644
(file)
--- a/
docker/Makefile
+++ b/
docker/Makefile
@@
-1,8
+1,9
@@
PROJECT_NAME?=evse
PROJECT_NAME?=evse
-NAME:=simulator
+NAME:=e-mobility-charging-stations-simulator
+SUBMODULES_INIT?=false
DOCKER_ECR_ACCOUNT_ID?=166296450311
DOCKER_ECR_REGION?=eu-west-3
DOCKER_ECR_ACCOUNT_ID?=166296450311
DOCKER_ECR_REGION?=eu-west-3
-DOCKER_ECR_REGISTRY_NAME?=e
v_
simulator
+DOCKER_ECR_REGISTRY_NAME?=e
-mobility-charging-stations-
simulator
DOCKER_ECR_TAG?=latest
.PHONY: all
DOCKER_ECR_TAG?=latest
.PHONY: all
@@
-12,24
+13,29
@@
default: all
submodule-update:
git submodule update --init --recursive
submodule-update:
git submodule update --init --recursive
-$(NAME): submodule-update
- docker-compose -p $(PROJECT_NAME) up -d
+submodules-init=
+ifeq '$(SUBMODULES_INIT)' 'true'
+ submodules-init += submodule-update
+endif
-$(NAME)-force: submodule-update
- docker-compose -p $(PROJECT_NAME) up -d --build --force-recreate
+$(NAME): $(submodules-init)
+ docker compose -p $(PROJECT_NAME) up -d
+
+$(NAME)-force: $(submodules-init)
+ docker compose -p $(PROJECT_NAME) up -d --build --force-recreate
all: $(NAME)
clean-images:
all: $(NAME)
clean-images:
- -docker rmi $(PROJECT_NAME)
_
$(NAME)
+ -docker rmi $(PROJECT_NAME)
-
$(NAME)
clean-containers:
clean-containers:
- -docker
-
compose -p $(PROJECT_NAME) down
+ -docker
compose -p $(PROJECT_NAME) down
clean: clean-containers clean-images
docker-tag-ecr:
clean: clean-containers clean-images
docker-tag-ecr:
- docker tag $(PROJECT_NAME)
_
$(NAME) $(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)
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)