- Created `DEPLOYMENT-FIXES.md` to document issues and solutions for Gitea Actions.
- Fixed Dockerfile path for standalone build.
- Enhanced `gitea-deploy.sh` with improved environment variable handling and extended health check timeouts.
- Introduced `gitea-deploy-simple.sh` for simplified deployments without database dependencies.
- Updated Next.js configuration to resolve build issues.
- Improved health check logic and error handling across all Gitea workflows.
✅ These changes enhance deployment reliability and provide better debugging information.
- Create new ci-cd-zero-downtime-fixed.yml workflow
- Disable old workflows that try to access port 3000 directly
- New workflow uses docker-compose.zero-downtime.yml
- Health checks now use nginx on port 80 instead of direct port 3000
- Fixes the 'Connection refused' errors in Gitea Actions
✅ Actions now properly work with zero-downtime nginx setup
- Add aggressive container cleanup including specific problematic container ID
- Export environment variables before docker compose commands
- Remove all containers with 'portfolio' in name to prevent conflicts
- Fix both rolling update and fresh deployment cases
- Tested locally and verified working
- Environment variables now properly passed to docker compose
- Add comprehensive container cleanup before starting services
- Pass environment variables to docker compose commands
- Fix container name conflicts by removing all existing containers first
- Add local test script to verify deployment process
- Ensure clean environment for zero-downtime deployments
- Add specific removal of problematic container afa9a70588844b06e17d5e0527119d589a7a3fde8a17608447cf7d8d448cf261
- Force remove portfolio-app-new container before deployment
- Add container listing for debugging after cleanup
- Upgrade setup-node to v4 for better performance
- Add cache-dependency-path for more efficient caching
- Create fast workflow alternative with manual cache management
- Add comprehensive cleanup of all portfolio-app containers
- Dynamically find and remove containers with portfolio-app in name
- Remove specific problematic container names (portfolio-app-new, etc.)
- Add container pruning to clean up stopped containers
- Ensure clean environment before starting new temporary container
- Prevents any container name conflicts during deployment
- Use unique timestamp-based container names to avoid conflicts
- Clean up existing temporary containers before starting new ones
- Generate unique names like 'portfolio-app-temp-1234567890'
- Prevents 'container name already in use' errors
- Ensures reliable zero-downtime deployments
- Remove port mapping for temporary container to avoid conflicts
- Use docker exec for health checks instead of external port access
- Eliminates 'port already allocated' error
- Maintains zero-downtime functionality without port conflicts
- Add rolling update mechanism for seamless deployments
- Start new container on port 3001, health check, then switch
- Preserve database and redis connections during updates
- Automatic fallback to fresh deployment if no current container
- Add advanced nginx load balancer configuration for future use
- Eliminate container name conflicts with proper cleanup
- Website stays online during deployments
- Split CI/CD into two distinct workflows:
- 'Test and Build' for main branch (testing only)
- 'CI/CD Pipeline' for production branch (full deployment)
- Remove duplicate test-and-build job from production workflow
- Each workflow now has a single, clear purpose
- Eliminates confusion with multiple job views in Gitea
- Replace deprecated 'docker-compose' with modern 'docker compose'
- Update all workflow files to use new syntax
- Update documentation with correct commands
- Fixes 'command not found' error in CI/CD pipeline
- Compatible with Docker Compose V2 and newer versions
- Use Variables for non-sensitive data (NODE_ENV, LOG_LEVEL, URLs, emails)
- Use Secrets for sensitive data (passwords, auth tokens)
- Add all configured variables: NODE_ENV, LOG_LEVEL, UMAMI analytics
- Update verification checks to match actual configuration
- Improve debug workflow to show Variables vs Secrets clearly
- Fix environment variable mapping in Docker Compose deployment
- Allow NEXT_PUBLIC_BASE_URL to be set as either Variable or Secret
- Update CI/CD workflow to check both secrets and variables
- Update debug workflow to show whether values come from secrets or variables
- Use fallback syntax: secrets.VAR || vars.VAR
- Improve error messages to guide users to correct settings location
- Update all GitHub Actions to v3 for Gitea compatibility
- Fix artifact upload/download actions (v4 -> v3)
- Remove GitHub-specific features (GITHUB_STEP_SUMMARY)
- Add complete Docker Compose configuration with PostgreSQL and Redis
- Add environment secrets support for all workflows
- Add debug workflow for secrets verification
- Add comprehensive documentation for secrets setup
- Improve container networking and health checks
- Update security scan workflow to utilize a dedicated script for checking secrets, improving detection accuracy.
- Modify database connection setup in multiple scripts to use an environment variable fallback for DATABASE_URL, enhancing flexibility in different environments.
- Update CI/CD workflow to use specific Trivy version and change output format for vulnerability results.
- Add fallback npm audit step in case Trivy scan fails.
- Create a new security scan workflow that runs on push and pull request events, including scheduled scans.
- Introduce a security scan script to perform npm audit, Trivy scans, and check for potential secrets in the codebase.
- Ensure results are uploaded as artifacts for review and maintain retention policies for scan results.
- Change Docker image in docker-compose.prod.yml to use 'portfolio-app:latest'.
- Add new scripts for Gitea deployment and setup of Gitea runner.
- Introduce CI/CD workflows for automated testing, security scanning, and deployment in Gitea.
- Enhance package.json with new deployment scripts for Gitea integration.