-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Makefile
64 lines (43 loc) · 1.62 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
58
59
60
61
62
63
64
DC = docker exec -it opendorme_app /bin/bash -c
connect-app: ## Connect to app container
docker exec -it opendorme_app /bin/bash
build: ## Build container images
mkdir -p ./storage/nginx
touch ./storage/nginx/error.log
touch ./storage/nginx/access.log
docker-compose build
setup: build start composer-install key-generate migrate npm-install npm-dev ## Setup project for development
start: ## Start application silently
docker-compose up -d
stop: ## Stop application
docker-compose down
restart: stop start ## Restart the application
composer-install: ## Install composer dependencies
$(DC) 'composer install'
composer-update: ## Update composer dependencies
$(DC) 'composer update $(filter-out $@,$(MAKECMDGOALS))'
copy-env: ## Copy .env.example as .env
cp .env.example .env
key-generate: ## Generate key for laravel
$(DC) 'php artisan key:generate'
migrate: ## Migrate database
$(DC) 'php artisan migrate'
seed: ## Migrate database and seed
$(DC) 'php artisan migrate --seed'
test: ## Run tests
$(DC) 'php artisan test'
horizon: ## Run Horizon
$(DC) 'php artisan horizon'
npm-install: ## Install npm
$(DC) 'npm install'
npm-dev: ## Run development build
$(DC) 'npm run development'
npm-prod: ## Run production build
$(DC) 'npm run production'
cleanup-docker: ## Remove old docker images
docker rmi $$(docker images --filter "dangling=true" -q --no-trunc)
run: ## Run command in the container
$(DC) '$(filter-out $@,$(MAKECMDGOALS))'
help: # Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help