|
|
@@ -1,9 +1,9 @@
|
|
|
# Environment section -----------------------------------------------------
|
|
|
|
|
|
ifneq (,$(wildcard ./.env))
|
|
|
- include .env
|
|
|
- $(eval export $(shell sed -ne 's/ *#.*$$//; /./ s/=.*$$// p' .env))
|
|
|
- # Create frontend/.env file
|
|
|
+ include .env
|
|
|
+ $(eval export $(shell sed -ne 's/ *#.*$$//; /./ s/=.*$$// p' .env))
|
|
|
+# Create frontend/.env file
|
|
|
# $(shell export WS_PORT=$(WS_PORT) ;\
|
|
|
# export WEB_PORT=$(WEB_PORT) ;\
|
|
|
# export APP_ADDR=$(APP_ADDR) ;\
|
|
|
@@ -12,7 +12,7 @@ endif
|
|
|
|
|
|
appName = ${COMPOSE_PROJECT_NAME}
|
|
|
ifeq ($(appName),)
|
|
|
- appName = strprfcrm
|
|
|
+ appName = strprfcrm
|
|
|
endif
|
|
|
args = $(filter-out $@,$(MAKECMDGOALS))
|
|
|
|
|
|
@@ -23,11 +23,11 @@ $(eval export UID=$(shell id -u))
|
|
|
$(eval export GID=$(shell id -g))
|
|
|
|
|
|
ifneq ("$(wildcard docker-compose.local.yml)","")
|
|
|
- compose = docker compose -f docker-compose.yml -f docker-compose.local.yml -p $(appName)
|
|
|
- compose-debug = docker compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.debug.yml -p $(appName)
|
|
|
+ compose = docker compose -f docker-compose.yml -f docker-compose.local.yml -p $(appName)
|
|
|
+ compose-debug = docker compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.debug.yml -p $(appName)
|
|
|
else
|
|
|
- compose = docker compose -f docker-compose.yml -p $(appName)
|
|
|
- compose-debug = docker compose -f docker-compose.yml -f docker-compose.debug.yml -p $(appName)
|
|
|
+ compose = docker compose -f docker-compose.yml -p $(appName)
|
|
|
+ compose-debug = docker compose -f docker-compose.yml -f docker-compose.debug.yml -p $(appName)
|
|
|
endif
|
|
|
get_container_name = $(shell docker inspect -f '{{.Name}}' $(shell $(compose) ps -q $(1)) | sed -e 's~^/~~' | tr -d ' ')
|
|
|
message = @echo "\n========================================\n$(1)\n========================================\n"
|
|
|
@@ -47,9 +47,9 @@ mysql = docker exec -it $(call get_container_name, "db")
|
|
|
.PHONY: help
|
|
|
|
|
|
help:
|
|
|
- @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
|
|
|
- | sed -n 's/^\(.*\): \(.*\)##\(.*\)/\1 - \3/p' \
|
|
|
- | column -t -s ' '
|
|
|
+ @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
|
|
|
+ | sed -n 's/^\(.*\): \(.*\)##\(.*\)/\1 - \3/p' \
|
|
|
+ | column -t -s ' '
|
|
|
|
|
|
install: up-build composer-install db-migrate db-seed frontend-build ## Установка приложения
|
|
|
$(call message,"The application was successfully installed!")
|
|
|
@@ -72,7 +72,8 @@ remove:
|
|
|
pull:
|
|
|
$(compose) pull
|
|
|
|
|
|
-update: pull up
|
|
|
+update:
|
|
|
+ pull up
|
|
|
|
|
|
stop:
|
|
|
$(compose) stop
|
|
|
@@ -90,13 +91,13 @@ ps: ## Список запущенных контейнеров
|
|
|
$(compose) ps
|
|
|
|
|
|
#icons: ## Перестроить иконки
|
|
|
-# $(webserver) sh -c 'apk add yarn && cd /var/frontend && yarn run icons'
|
|
|
+# $(webserver) sh -c 'apk add yarn && cd /var/frontend && yarn run icons'
|
|
|
#
|
|
|
#frontend-run: ## Перестроить фронт приложения
|
|
|
-# $(webserver) sh -c 'apk add yarn && cd /var/frontend && yarn run build'
|
|
|
+# $(webserver) sh -c 'apk add yarn && cd /var/frontend && yarn run build'
|
|
|
#
|
|
|
#frontend-build: ## Перестроить фронт приложения
|
|
|
-# $(webserver) sh -c 'apk add yarn && cd /var/frontend && yarn install && yarn run build'
|
|
|
+# $(webserver) sh -c 'apk add yarn && cd /var/frontend && yarn install && yarn run build'
|
|
|
|
|
|
composer: ## Запуск composer
|
|
|
$(application) composer $(args)
|
|
|
@@ -128,8 +129,8 @@ application: ## Консоль приложения
|
|
|
pa: ## Консоль приложения
|
|
|
$(application) php artisan ${args}
|
|
|
|
|
|
-routes: ## Список маршрутов
|
|
|
- application-artisan route:list ${args}
|
|
|
+route-list: ## Список маршрутов
|
|
|
+ $(application) php artisan route:list ${args}
|
|
|
|
|
|
application-log: ## Лог выполнения задач
|
|
|
$(compose) logs app -f
|
|
|
@@ -166,4 +167,4 @@ log: ## Лог контейнеров
|
|
|
|
|
|
# Remove error message about lacking rules for targets' parameters
|
|
|
%:
|
|
|
- @:
|
|
|
+ @:
|