🚀 MAJOR: Full migration to Just modules with modern features

BREAKING CHANGES:
- Complete restructure to Just module architecture (requires Just 1.31.0+)
- Command syntax changed: 'just postgres-sql' → 'just postgres sql'
- Import syntax changed: import → mod declarations

NEW FEATURES:
 Module-based architecture with optional modules
 Built-in Just colors ({{RED}}, {{GREEN}}, etc.) replace custom variables
 Enhanced [confirm] attributes for all destructive operations
 Organized [group('name')] attributes for better UX
 Modern justfile with comprehensive help system
 Updated documentation with migration guide

MODULES:
📦 postgres/    - PostgreSQL operations (sql, check, create-database, etc.)
📦 mysql/       - MySQL operations (sql, check, create-user, etc.)
📦 volumes/     - Volume management (clean-all, remove, list)
📦 container/   - Container operations (start, stop, logs, shell, exec)
📦 registry/    - Registry auth (login, logout, check)
📦 images/      - Image operations (build, push, pull, tag, clean)

USAGE:
just postgres sql "SELECT version();"
just volumes clean-all
just images build myapp

This is Just Commons v2.0 - a complete modernization using all of Just's latest features.
This commit is contained in:
sHa
2025-09-27 02:27:53 +03:00
parent c359858ee9
commit d3fec4b85a
11 changed files with 928 additions and 775 deletions

View File

@@ -45,12 +45,6 @@ env-check:
#!/usr/bin/env bash
set -euo pipefail
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
echo "================================================"
echo " Container Environment Detection"
@@ -60,23 +54,23 @@ env-check:
# Check Docker
if command -v docker >/dev/null 2>&1; then
if docker info >/dev/null 2>&1; then
echo -e "${GREEN}✓ Docker Engine detected and running${NC}"
echo -e "{{GREEN}}✓ Docker Engine detected and running{{NORMAL}}"
docker_available=true
else
echo -e "${YELLOW}⚠ Docker is installed but daemon is not running${NC}"
echo -e "{{YELLOW}}⚠ Docker is installed but daemon is not running{{NORMAL}}"
docker_available=false
fi
else
echo -e "${RED}✗ Docker not found${NC}"
echo -e "{{RED}}✗ Docker not found{{NORMAL}}"
docker_available=false
fi
# Check Podman
if command -v podman >/dev/null 2>&1; then
echo -e "${GREEN}✓ Podman detected${NC}"
echo -e "{{GREEN}}✓ Podman detected{{NORMAL}}"
podman_available=true
else
echo -e "${RED}✗ Podman not found${NC}"
echo -e "{{RED}}✗ Podman not found{{NORMAL}}"
podman_available=false
fi
@@ -86,14 +80,14 @@ env-check:
echo "================================================"
if [ "$docker_available" = true ] || [ "$podman_available" = true ]; then
echo -e "${GREEN}🎉 Container runtime available!${NC}"
echo -e "{{GREEN}}🎉 Container runtime available!{{NORMAL}}"
echo ""
echo "You can use these universal commands:"
echo " just build <project> # Build any project image"
echo " just start <service> # Start any service"
echo " just registry-login # Login to registry"
echo " just images build <project> # Build any project image"
echo " just container start <service> # Start any service"
echo " just registry login # Login to registry"
else
echo -e "${RED}❌ No container runtime available${NC}"
echo -e "{{RED}}❌ No container runtime available{{NORMAL}}"
echo ""
echo "Please install Docker or Podman:"
echo " • Docker: https://docs.docker.com/get-docker/"