Commit Graph

20 Commits

Author SHA1 Message Date
denshooter
fc3f9ebf12 🔧 Enhance Gitea deployment workflows and fix nginx configuration
Some checks failed
CI/CD Pipeline (Fast) / production (push) Failing after 6m12s
CI/CD Pipeline (Reliable & Simple) / production (push) Failing after 8m16s
CI/CD Pipeline (Simple & Reliable) / production (push) Failing after 6m19s
- Added new CI/CD workflow `ci-cd-reliable.yml` for reliable deployments with database support.
- Created `docker-compose.zero-downtime-fixed.yml` to address nginx configuration issues for zero-downtime deployments.
- Improved existing workflows to check for nginx configuration file and create a fallback if missing.
- Updated `DEPLOYMENT-FIXES.md` to document new workflows and fixes.

 These changes improve deployment reliability and ensure proper nginx configuration for seamless updates.
2025-09-14 19:11:37 +02:00
denshooter
ca2cbc2c92 🔧 Implement deployment fixes and enhance Gitea workflows
Some checks failed
CI/CD Pipeline (Fast) / production (push) Failing after 6m6s
CI/CD Pipeline (Simple & Reliable) / production (push) Failing after 6m15s
CI/CD Pipeline (Zero Downtime - Fixed) / production (push) Failing after 7m59s
- 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.
2025-09-13 23:48:50 +02:00
denshooter
116dac89b3 🔧 Fix Gitea Actions for zero-downtime deployment
- 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
2025-09-13 23:20:51 +02:00
denshooter
bdc38d8b57 Fix container conflicts and environment variables properly
Some checks failed
CI/CD Pipeline (Fast) / production (push) Failing after 3m40s
CI/CD Pipeline (Zero Downtime) / production (push) Failing after 7m57s
CI/CD Pipeline (Simple) / production (push) Failing after 9m21s
- 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
2025-09-13 21:12:32 +02:00
denshooter
6338a34612 Fix container conflicts and environment variables
Some checks failed
CI/CD Pipeline (Fast) / production (push) Failing after 3m40s
CI/CD Pipeline (Zero Downtime) / production (push) Failing after 7m53s
CI/CD Pipeline (Simple) / production (push) Has been cancelled
- 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
2025-09-13 20:59:01 +02:00
denshooter
58dd60ea64 Force remove problematic container and improve Node.js setup
Some checks failed
CI/CD Pipeline (Fast) / production (push) Failing after 4m18s
CI/CD Pipeline (Zero Downtime) / production (push) Failing after 7m51s
CI/CD Pipeline (Simple) / production (push) Failing after 7m53s
- 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
2025-09-13 18:44:54 +02:00
denshooter
65ad26eeae Enhance container cleanup for zero-downtime deployment
Some checks failed
CI/CD Pipeline (Zero Downtime) / production (push) Failing after 7m57s
CI/CD Pipeline (Simple) / production (push) Failing after 7m54s
- 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
2025-09-13 18:21:36 +02:00
denshooter
20a6c416e3 Fix container name conflicts in zero-downtime deployment
Some checks failed
CI/CD Pipeline (Zero Downtime) / production (push) Failing after 7m55s
CI/CD Pipeline (Simple) / production (push) Failing after 7m53s
- 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
2025-09-13 01:24:34 +02:00
denshooter
89e0f9f2f8 Fix port conflict in zero-downtime deployment
Some checks failed
CI/CD Pipeline (Zero Downtime) / production (push) Failing after 7m49s
CI/CD Pipeline (Simple) / production (push) Has been cancelled
- 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
2025-09-13 01:13:43 +02:00
denshooter
8d627028cb Implement zero-downtime deployment strategy
Some checks failed
CI/CD Pipeline (Zero Downtime) / production (push) Failing after 7m51s
CI/CD Pipeline (Simple) / production (push) Has been cancelled
- 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
2025-09-13 01:02:37 +02:00
denshooter
8afc63ef0b Separate CI/CD workflows for clarity
Some checks failed
CI/CD Pipeline (Simple) / production (push) Failing after 7m52s
- 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
2025-09-13 00:39:08 +02:00
denshooter
72456aa7a0 Fix Docker Compose command syntax
Some checks failed
CI/CD Pipeline (Simple) / test-and-build (push) Has been skipped
CI/CD Pipeline (Simple) / production (push) Has been cancelled
- 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
2025-09-13 00:35:02 +02:00
denshooter
4ccb2b146d Update workflows to match actual Variables and Secrets configuration
Some checks failed
CI/CD Pipeline (Simple) / test-and-build (push) Has been skipped
CI/CD Pipeline (Simple) / production (push) Failing after 7m54s
- 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
2025-09-13 00:16:43 +02:00
denshooter
e245e8afe1 Support both Variables and Secrets in workflows
Some checks failed
CI/CD Pipeline (Simple) / test-and-build (push) Has been skipped
CI/CD Pipeline (Simple) / production (push) Has been cancelled
- 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
2025-09-13 00:12:20 +02:00
denshooter
83705af7f6 cleanup and Test pre-push hook 2025-09-12 23:31:46 +02:00
denshooter
b34deb3c81 Optimize CI/CD pipeline - remove redundant builds
Some checks failed
CI/CD Pipeline (Simple) / test-and-build (push) Has been cancelled
CI/CD Pipeline (Simple) / production (push) Has been cancelled
CI/CD Pipeline / test (push) Successful in 8m40s
Security Scan / security (push) Successful in 7m47s
CI/CD Pipeline / security (push) Successful in 5m14s
CI/CD Pipeline / build (push) Successful in 4m1s
CI/CD Pipeline / deploy (push) Failing after 24s
- Replace inefficient multi-job pipeline with simple single-job approach
- Eliminate duplicate builds (npm build + docker build)
- Reduce pipeline complexity and execution time
- Keep old pipeline as backup (ci-cd-old.yml)
- Simple pipeline: Install → Lint → Test → Build → Security → Deploy (production only)
- Non-production branches: Install → Lint → Test → Build → Security
2025-09-12 23:28:11 +02:00
denshooter
a4c61172f6 Fix Gitea Actions compatibility and improve container configuration
Some checks failed
CI/CD Pipeline / test (push) Successful in 9m19s
CI/CD Pipeline / security (push) Has been cancelled
CI/CD Pipeline / build (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
Security Scan / security (push) Has been cancelled
- 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
2025-09-12 23:18:01 +02:00
denshooter
f7e0172111 Refactor security scanning and database setup
Some checks failed
CI/CD Pipeline / test (push) Successful in 10m54s
Security Scan / security (push) Failing after 5m21s
CI/CD Pipeline / security (push) Successful in 5m25s
CI/CD Pipeline / build (push) Failing after 2m27s
CI/CD Pipeline / deploy (push) Has been skipped
- 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.
2025-09-11 11:17:35 +02:00
denshooter
c4bc27273e Implement security scanning workflows and scripts
Some checks failed
CI/CD Pipeline / test (push) Successful in 10m59s
Security Scan / security (push) Failing after 5m27s
CI/CD Pipeline / security (push) Successful in 5m57s
CI/CD Pipeline / build (push) Failing after 3m3s
CI/CD Pipeline / deploy (push) Has been skipped
- 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.
2025-09-11 10:44:03 +02:00
denshooter
09d925745d Update Docker configuration and add Gitea CI/CD workflows
Some checks failed
CI/CD Pipeline / test (push) Successful in 12m0s
CI/CD Pipeline / security (push) Failing after 6m6s
CI/CD Pipeline / build (push) Has been skipped
CI/CD Pipeline / deploy (push) Has been skipped
- 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.
2025-09-10 15:14:55 +02:00