-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (32 loc) · 1.76 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
################ Docker commands ################
# include .env - можно брать настройки из .env файла, к переменным обращаться так же $(VARIABLE)
include .env
# вызывает по умолчанию команду help.
.PHONY: help
help: ### Ignore - Show current help message
@echo "Available 🔶Docker commands:"
@grep -E '^[a-zA-Z_-]+:.*?## 🔶.*$$' ./Makefile | awk '!/## Ignore/' | \
awk 'BEGIN {FS = ":.*?## "}; {printf "make \033[32m%-30s\033[0m %s\n", $$1, $$2}'
@echo ""
@echo "Available 🚀App commands:"
@grep -E '^[a-zA-Z_-]+:.*?🚀.*$$' ./Makefile | awk '!/## Ignore/' | \
awk 'BEGIN {FS = ":.*?## "}; {printf "make \033[32m%-30s\033[0m %s\n", $$1, $$2}'
@echo ""
build: ## 🔶Docker - Builds Docker Image Without Using Cache
docker-compose build --no-cache
up: ## 🔶Docker - Starts the Docker Container and Opens the Terminal
docker-compose up -d && make bash
down: ## 🔶Docker - Stops the Docker Container
docker-compose down
bash: ## 🔶Docker - Opens the Terminal in the Current Docker Container
docker exec -it ${CONTAINER_NAME} zsh || winpty docker exec -it ${CONTAINER_NAME} zsh
@echo "\n\n";
################ App commands ################
app-install-npm: ## 🚀App - Installs NPM Required NPM Packages for the App
docker exec -it ${CONTAINER_NAME} make -C /home/app install-npm
app-install-yarn: ## 🚀App - Installs YARN Required NPM Packages for the App
docker exec -it ${CONTAINER_NAME} make -C /home/app install-yarn
app-start: ## 🚀App - Starts the App Server in Development Mode
docker exec -it ${CONTAINER_NAME} make -C /home/app start
app-build: ## 🚀App - Builds the App in Production Mode (Compressed Files)
docker exec -it ${CONTAINER_NAME} make -C /home/app build