Modern ERP Reports Application with microservices architecture Tech Stack: - Backend: FastAPI + python-oracledb (Oracle DB integration) - Frontend: Vue.js 3 + PrimeVue + Vite - Telegram Bot: python-telegram-bot + SQLite - Infrastructure: Shared database pool, JWT authentication, SSH tunnel Features: - FastAPI backend with async Oracle connection pool - Vue.js 3 responsive frontend with PrimeVue components - Telegram bot alternative interface - Microservices architecture with shared components - Complete deployment support (Linux Docker + Windows IIS) - Comprehensive testing (Playwright E2E + pytest) Repository Structure: - reports-app/ - Main application (backend, frontend, telegram-bot) - shared/ - Shared components (database pool, auth, utils) - deployment/ - Deployment scripts (Linux & Windows) - docs/ - Project documentation - security/ - Security scanning and git hooks
58 lines
1.5 KiB
Bash
58 lines
1.5 KiB
Bash
#!/bin/bash
|
|
#
|
|
# 🔒 ROA2WEB Git Hooks Installer
|
|
# Installs security git hooks to prevent secrets commits
|
|
#
|
|
|
|
set -e
|
|
|
|
# Colors
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
echo -e "${GREEN}🔒 Installing ROA2WEB Security Git Hooks${NC}"
|
|
echo "=========================================="
|
|
|
|
# Check if we're in a git repository
|
|
if [[ ! -d ".git" ]]; then
|
|
echo -e "${RED}❌ Error: Not in a git repository${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
# Create hooks directory if it doesn't exist
|
|
mkdir -p .git/hooks
|
|
|
|
# Install pre-commit hook
|
|
if [[ -f "security/git_hooks/pre-commit" ]]; then
|
|
cp security/git_hooks/pre-commit .git/hooks/pre-commit
|
|
chmod +x .git/hooks/pre-commit
|
|
echo -e "${GREEN}✅ Installed pre-commit hook${NC}"
|
|
else
|
|
echo -e "${RED}❌ Error: pre-commit hook file not found${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
# Install commit-msg hook
|
|
if [[ -f "security/git_hooks/commit-msg" ]]; then
|
|
cp security/git_hooks/commit-msg .git/hooks/commit-msg
|
|
chmod +x .git/hooks/commit-msg
|
|
echo -e "${GREEN}✅ Installed commit-msg hook${NC}"
|
|
else
|
|
echo -e "${RED}❌ Error: commit-msg hook file not found${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
echo ""
|
|
echo -e "${GREEN}🎉 Git hooks installed successfully!${NC}"
|
|
echo ""
|
|
echo "📋 Installed hooks:"
|
|
echo " • pre-commit - Scans for secrets before commit"
|
|
echo " • commit-msg - Validates commit messages"
|
|
echo ""
|
|
echo "🔧 To bypass hooks (NOT RECOMMENDED):"
|
|
echo " git commit --no-verify"
|
|
echo ""
|
|
echo "🗑️ To uninstall hooks:"
|
|
echo " rm .git/hooks/pre-commit .git/hooks/commit-msg" |