Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/make
include .env
export
.PHONY: help
.DEFAULT_GOAL := help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
##@ Initialize work
init: ## Start a new develop enviroment
cp docker-compose.yml.develop docker-compose.yml
cp .env.develop .env
##@ Development
dev: ## Start dev mode with terminal attached
docker-compose up
down: ## Start dev mode with terminal attached
docker-compose down && docker-compose rm -f
migrate: ## Migrate database
docker exec -it ${DOCKER_SERVICE_API} bash -c "su -c \"php artisan migrate\" application"
rollback: ## Rollback the last migrate
docker exec -it ${DOCKER_SERVICE_API} bash -c "su -c \"php artisan migrate:rollback\" application"
migration: ## Create a migration file
/bin/bash .scripts/migration.sh
##@ Deploy
stage: ## Publish the app to stage environment
/usr/bin/bash ./dist/stage/deploy.sh
production: ## Publish the app to production environment
/usr/bin/bash ./dist/production/deploy.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.