Skip to content
Permalink
Browse files

Actually working with ENV file existence check and env variable setti…

…ng for docker-compose command
  • Loading branch information...
darakian committed Feb 1, 2019
1 parent 86a2fd5 commit 887784d19852b1f0954af1df80e0c94c8c0a72eb
Showing with 5 additions and 3 deletions.
  1. +5 −3 Makefile
@@ -33,9 +33,11 @@ run-cloudy-mozdef: ## Run the MozDef containers necessary to run in AWS (`cloudy

.PHONY: run-env-mozdef
run-env-mozdef: ## Run the MozDef containers with a user specified env file. Run with make 'run-env-mozdef -e ENV=my.env'
$(shell test -f $(ENV) || touch $(ENV))
ENV_FILE=$(abspath $(ENV))
docker-compose -f docker/compose/docker-compose.yml -f docker/compose/docker-compose-user-env.yml -p $(NAME) up -d
ifneq ("$(wildcard $(ENV))","") #Check for existence of ENV
ENV_FILE=$(abspath $(ENV)) docker-compose -f docker/compose/docker-compose.yml -f docker/compose/docker-compose-user-env.yml -p $(NAME) up -d
else
@echo $(ENV) not found.
endif

restart-cloudy-mozdef:
docker-compose -f docker/compose/docker-compose-cloudy-mozdef.yml -p $(NAME) restart

0 comments on commit 887784d

Please sign in to comment.
You can’t perform that action at this time.