add minifying, cache busting, and auto prod and dev mode
This commit is contained in:
50
Makefile
Normal file
50
Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
.PHONY: help build clean install run test deploy
|
||||
|
||||
help: ## Show this help message
|
||||
@echo "Available commands:"
|
||||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
install: ## Install Python dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
build: ## Build minified assets with cache busting
|
||||
python build_assets.py
|
||||
|
||||
clean: ## Clean old cache-busted assets
|
||||
python build_assets.py clean
|
||||
|
||||
run: ## Run the Flask development server
|
||||
export FLASK_ENV=development && export FLASK_DEBUG=1 && python app.py
|
||||
|
||||
run-prod: ## Run the Flask production server
|
||||
export FLASK_ENV=production && export FLASK_DEBUG=0 && python app.py
|
||||
|
||||
test: ## Run tests (placeholder)
|
||||
@echo "No tests configured yet"
|
||||
|
||||
deploy: clean build ## Deploy: clean old assets and build new ones
|
||||
@echo "Deployment completed!"
|
||||
|
||||
docker-build: ## Build Docker image
|
||||
docker build -t kobelly .
|
||||
|
||||
docker-run: ## Run Docker container (production)
|
||||
docker-compose up -d
|
||||
|
||||
docker-run-dev: ## Run Docker container (development)
|
||||
docker-compose -f docker-compose.dev.yml up -d
|
||||
|
||||
docker-stop: ## Stop Docker container
|
||||
docker-compose down
|
||||
|
||||
docker-stop-dev: ## Stop Docker container (development)
|
||||
docker-compose -f docker-compose.dev.yml down
|
||||
|
||||
docker-logs: ## Show Docker logs
|
||||
docker-compose logs -f
|
||||
|
||||
docker-logs-dev: ## Show Docker logs (development)
|
||||
docker-compose -f docker-compose.dev.yml logs -f
|
||||
|
||||
dev-setup: install build ## Setup development environment
|
||||
@echo "Development environment ready!"
|
||||
Reference in New Issue
Block a user