Files
Base-website/Makefile
2025-07-15 11:33:04 +02:00

139 lines
4.1 KiB
Makefile

# Kobelly Base Website - Makefile
.PHONY: help install build clean run run-prod deploy dev-setup docker-run docker-run-dev docker-stop docker-stop-dev docker-logs docker-logs-dev
# Default target
help:
@echo "Kobelly Base Website - Available Commands:"
@echo ""
@echo "Development:"
@echo " install - Install Python dependencies"
@echo " dev-setup - Setup development environment"
@echo " run - Run development server"
@echo " run-prod - Run production server"
@echo ""
@echo "Build & Deploy:"
@echo " build - Build minified assets"
@echo " clean - Clean old assets"
@echo " deploy - Clean and build assets"
@echo ""
@echo "Docker:"
@echo " docker-run - Run production Docker container"
@echo " docker-run-dev - Run development Docker container"
@echo " docker-stop - Stop production container"
@echo " docker-stop-dev - Stop development container"
@echo " docker-logs - View production logs"
@echo " docker-logs-dev - View development logs"
# Install dependencies
install:
@echo "📦 Installing Python dependencies..."
pip install -r requirements.txt
@echo "✅ Dependencies installed successfully!"
# Setup development environment
dev-setup: install
@echo "🔧 Setting up development environment..."
@echo "✅ Development environment ready!"
@echo "💡 Run 'make run' to start the development server"
# Build assets
build:
@echo "🔨 Building assets..."
python build_assets.py
@echo "✅ Assets built successfully!"
# Clean old assets
clean:
@echo "🧹 Cleaning old assets..."
python build_assets.py clean
@echo "✅ Cleanup completed!"
# Deploy (clean + build)
deploy: clean build
@echo "🚀 Deployment ready!"
# Run development server
run:
@echo "🚀 Starting development server..."
@echo "🌐 Website will be available at: http://localhost:5000"
@echo "🔧 Debug mode: ON"
@echo "📝 Press Ctrl+C to stop"
FLASK_DEBUG=1 python app.py
# Run production server
run-prod:
@echo "🚀 Starting production server..."
@echo "🌐 Website will be available at: http://localhost:5000"
@echo "🔧 Debug mode: OFF"
@echo "📝 Press Ctrl+C to stop"
FLASK_DEBUG=0 python app.py
# Docker commands
docker-run:
@echo "🐳 Running production Docker container..."
docker-compose up --build -d
@echo "✅ Production container started!"
@echo "🌐 Website available at: http://localhost:10332"
docker-run-dev:
@echo "🐳 Running development Docker container..."
docker-compose -f docker-compose.dev.yml up --build -d
@echo "✅ Development container started!"
@echo "🌐 Website available at: http://localhost:10333"
docker-stop:
@echo "🛑 Stopping production Docker container..."
docker-compose down
@echo "✅ Production container stopped!"
docker-stop-dev:
@echo "🛑 Stopping development Docker container..."
docker-compose -f docker-compose.dev.yml down
@echo "✅ Development container stopped!"
docker-logs:
@echo "📋 Production container logs:"
docker-compose logs -f
docker-logs-dev:
@echo "📋 Development container logs:"
docker-compose -f docker-compose.dev.yml logs -f
# Additional utility commands
test:
@echo "🧪 Running tests..."
@echo "⚠️ No tests configured yet"
@echo "💡 Add your test commands here"
lint:
@echo "🔍 Running linting..."
@echo "⚠️ No linting configured yet"
@echo "💡 Add your linting commands here"
format:
@echo "🎨 Formatting code..."
@echo "⚠️ No formatting configured yet"
@echo "💡 Add your formatting commands here"
# Database commands (if needed in the future)
db-migrate:
@echo "🗄️ Running database migrations..."
@echo "⚠️ No database configured yet"
@echo "💡 Add your migration commands here"
db-seed:
@echo "🌱 Seeding database..."
@echo "⚠️ No database configured yet"
@echo "💡 Add your seeding commands here"
# Backup and restore (if needed in the future)
backup:
@echo "💾 Creating backup..."
@echo "⚠️ No backup configured yet"
@echo "💡 Add your backup commands here"
restore:
@echo "📥 Restoring from backup..."
@echo "⚠️ No restore configured yet"
@echo "💡 Add your restore commands here"