-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (30 loc) · 1.22 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# REQUIRED SECTION
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include $(ROOT_DIR)/.mk-lib/common.mk
include .env
export
# END OF REQUIRED SECTION
.PHONY: help dependencies up start stop restart status ps clean network
dependencies: check-dependencies ## Check dependencies
up: ## Start all or c=<name> containers in foreground
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up $(c)
start: ## Start all or c=<name> containers in background
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d $(c)
stop: ## Stop all or c=<name> containers
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) stop $(c)
restart: ## Restart all or c=<name> containers
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) stop $(c)
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up $(c) -d
status: ## Show status of containers
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) ps
start-service: # traefik proxy
@docker-compose up traefik
stop-service: # traefik proxy
@docker-compose stop traefik
ps: status ## Alias of status
clean: confirm ## Clean all data
@$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) down
network: ## Create proxy network
-@docker network create lb
install-sockets: ## Enable socket activation
./socket-activation/setup.sh traefik