Implement comprehensive homepage improvements and SEO optimization

Major homepage and SEO enhancements based on optimization document:

**Homepage Content Updates:**
- Updated H1 titles with SEO-optimized text for both RO/EN
- Enhanced hero descriptions with targeted keywords
- Improved feature descriptions for better clarity
- Updated daily verse section with keyword-rich titles
- Added new footer description with SEO focus

**SEO Implementation:**
- Added dynamic metadata generation with locale-specific SEO
- Implemented Open Graph tags for social media sharing
- Added Twitter Card metadata for enhanced sharing
- Integrated Schema.org JSON-LD structured data
- Set up hreflang tags for international SEO
- Added canonical URLs to prevent duplicate content
- Included targeted keywords for both languages

**Technical Improvements:**
- Migrated from Docker to PM2 deployment
- Removed Docker files and updated deployment scripts
- Updated README with PM2 instructions
- Fixed console log cleanup for production
- Added proper favicon with Next.js app directory
- Increased memory limit to 4GB for better performance
- Updated port configuration to 0.0.0.0:3010
- Set Romanian (/ro) as default locale with proper redirects

**Translation Updates:**
- Enhanced Romanian translations with SEO-optimized content
- Updated English translations with matching SEO improvements
- Added new 'seo' namespace for metadata translations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Assistant
2025-09-22 18:40:21 +00:00
parent b24251eb2d
commit d4b0062521
18 changed files with 256 additions and 249 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# Deploy script for Biblical Guide production server
# Fetches latest code from production branch and deploys
# Fetches latest code from production branch and deploys with PM2
set -e
@@ -11,6 +11,7 @@ echo "🚀 Starting deployment..."
REPO_URL="https://git.noru1.ro/andrei/ghidul-biblic.git"
BRANCH="production"
APP_NAME="ghidul-biblic"
PORT="3010"
# Colors for output
RED='\033[0;31m'
@@ -60,10 +61,6 @@ fi
print_success "Environment variables validated"
# Stop existing containers
print_status "Stopping existing containers..."
docker compose down || true
# Fetch latest code from production branch
print_status "Fetching latest code from $BRANCH branch..."
git fetch origin $BRANCH
@@ -76,40 +73,54 @@ CURRENT_COMMIT=$(git rev-parse --short HEAD)
COMMIT_MSG=$(git log -1 --pretty=format:"%s")
print_status "Current commit: $CURRENT_COMMIT - $COMMIT_MSG"
# Build and start the application
print_status "Building and starting application..."
docker compose up --build -d
# Install dependencies if package.json changed
if git diff --name-only HEAD~1 HEAD | grep -q "package.json\|package-lock.json"; then
print_status "Dependencies changed, installing..."
npm ci
print_success "Dependencies installed"
fi
# Build the application
print_status "Building application..."
npm run build
print_success "Application built successfully"
# Restart with PM2
print_status "Restarting application with PM2..."
pm2 restart $APP_NAME || pm2 start ecosystem.config.js --env production
# Save PM2 configuration
pm2 save
print_success "Application restarted with PM2"
# Wait for application to be ready
print_status "Waiting for application to start..."
sleep 10
sleep 5
# Health check
print_status "Performing health check..."
for i in {1..30}; do
if curl -f http://localhost:3010/api/health >/dev/null 2>&1; then
print_success "Application is healthy and running on port 3010"
if curl -f http://localhost:$PORT/api/health >/dev/null 2>&1; then
print_success "Application is healthy and running on port $PORT"
break
fi
if [ $i -eq 30 ]; then
print_error "Health check failed after 30 attempts"
print_status "Showing container logs:"
docker compose logs --tail=50
print_status "Showing PM2 logs:"
pm2 logs $APP_NAME --lines 20
exit 1
fi
sleep 2
done
# Show running containers
print_status "Running containers:"
docker compose ps
# Cleanup old images (keep last 3)
print_status "Cleaning up old Docker images..."
docker image prune -f >/dev/null 2>&1 || true
# Show PM2 status
print_status "PM2 Status:"
pm2 status
print_success "🎉 Deployment completed successfully!"
print_status "Application is now running at: http://localhost:3010"
print_status "API health endpoint: http://localhost:3010/api/health"
print_status "Application is now running at: http://localhost:$PORT"
print_status "API health endpoint: http://localhost:$PORT/api/health"