-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (19 loc) · 854 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
COMPOSE_BIN=docker compose
BASE_COMPOSE_COMMAND=$(COMPOSE_BIN) --project-name blog-hs
COMPOSE_FILE=deployment/docker-compose.yml
DOCKERFILE_PATH=deployment/Dockerfile
DOCKER_IMAGE_NAME=blog-hs
deploy-dev: $(COMPOSE_FILE)
$(BASE_COMPOSE_COMMAND) -f $(COMPOSE_FILE) --profile dev up -d
destroy-dev: $(COMPOSE_FILE)
$(BASE_COMPOSE_COMMAND) -f $(COMPOSE_FILE) --profile dev down
deploy-dev-app: $(COMPOSE_FILE)
$(BASE_COMPOSE_COMMAND) -f $(COMPOSE_FILE) --profile dev-app up -d
destroy-dev-app: $(COMPOSE_FILE)
$(BASE_COMPOSE_COMMAND) -f $(COMPOSE_FILE) --profile dev-app down
deploy: $(COMPOSE_FILE)
$(BASE_COMPOSE_COMMAND) -f $(COMPOSE_FILE) --profile app up -d
destroy: $(COMPOSE_FILE)
$(BASE_COMPOSE_COMMAND) -f $(COMPOSE_FILE) --profile app down
build-image: $(DOCKERFILE_PATH)
docker build -t $(DOCKER_IMAGE_NAME) -f $(DOCKERFILE_PATH) .