You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
phpvms/Makefile

80 lines
1.9 KiB

7 years ago
#
#
# Create the phpvms database if needed:
# docker exec phpvms /usr/bin/mysql -uroot -e 'CREATE DATABASE phpvms'
CURR_PATH=$(shell pwd)
.PHONY: all
7 years ago
all: install
7 years ago
7 years ago
.PHONY: clean
clean:
@find bootstrap/cache -type f -not -name '.gitignore' -print0 -delete
@find storage/app/public -type f -not -name '.gitignore' -print0 -delete
@find storage/app -type f -not -name '.gitignore' -not -name public -print0 -delete
@find storage/framework/cache -type f -not -name '.gitignore' -print0 -delete
@find storage/framework/sessions -type f -not -name '.gitignore' -print0 -delete
@find storage/framework/views -type f -not -name '.gitignore' -print0 -delete
@find storage/logs -type f -not -name '.gitignore' -print0 -delete
@php artisan route:clear
@php artisan config:clear
7 years ago
.PHONY: build
build:
@composer install --no-interaction
.PHONY: install
7 years ago
install: build
@php artisan database:create
@php artisan migrate --seed
@make import-airports
@echo "Done!"
.PHONY: update
update: build
7 years ago
@php artisan migrate
@echo "Done!"
.PHONY: reset
reset: clean
@php artisan database:create --reset
7 years ago
@php artisan migrate:refresh --seed
@make update
.PHONY: tests
tests: test
.PHONY: test
test:
#php artisan database:create --reset
vendor/bin/phpunit --debug --verbose
.PHONY: sass-watch
sass-watch:
sass --watch public/assets/admin/sass/paper-dashboard.scss:public/assets/admin/css/paper-dashboard.css
.PHONY: schema
schema:
#php artisan infyom:scaffold Aircraft --fieldsFile=database/schema/aircraft.json
echo ""
.PHONY: docker
7 years ago
docker:
@mkdir -p $(CURR_PATH)/tmp/mysql
-docker rm -f phpvms
docker build -t phpvms .
docker run --name=phpvms \
-v $(CURR_PATH):/var/www/ \
-v $(CURR_PATH)/tmp/mysql:/var/lib/mysql \
-p 8080:80 \
phpvms
.PHONY: docker-clean
7 years ago
docker-clean:
-docker stop phpvms
-docker rm -rf phpvms
-rm core/local.config.php
-rm -rf tmp/mysql