-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (42 loc) · 1.11 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
45
46
47
48
49
50
51
52
53
54
55
56
57
# COLORS
GREEN = \033[1;32m
RED = \033[1;31m
ORANGE = \033[1;33m
CYAN = \033[1;36m
RESET = \033[0m
# FOLDER
SRCS_DIR = ./
ENV_FILE = ${SRCS_DIR}.env
DOCKER_DIR = ${SRCS_DIR}docker-compose.yml
# COMMANDS
DOCKER = docker compose -f ${DOCKER_DIR} --env-file ${ENV_FILE} -p camagru
%:
@:
all: up
start: up
up:
@echo "${GREEN}Starting containers...${RESET}"
@${DOCKER} up -d --remove-orphans
down:
@echo "${RED}Stopping containers...${RESET}"
@${DOCKER} down
stop:
@echo "${RED}Stopping containers...${RESET}"
@${DOCKER} stop
rebuild:
@echo "${GREEN}Rebuilding containers...${RESET}"
@${DOCKER} up -d --remove-orphans --build
delete:
@echo "${RED}Deleting containers...${RESET}"
@${DOCKER} down -v --remove-orphans
rebuild-no-cache:
@echo "${GREEN}Rebuilding containers...${RESET}"
@${DOCKER} build --no-cache
@${DOCKER} up -d --remove-orphans --build
frankenphp:
@echo "${GREEN}Running frankenphp ...${RESET}"
@${DOCKER} exec frankenphp sh
mysql8:
@echo "${GREEN}Running mysql 8 ...${RESET}"
@${DOCKER} exec mysql_8 bash
.PHONY: all start up down stop rebuild delete rebuild-no-cache frankenphp mysql8