Commit Graph

32 Commits

Author SHA1 Message Date
denshooter
07cf999a9e Fix Docker deployment - use built image instead of building locally
- Change docker-compose.prod.yml to use ghcr.io image instead of building
- Add --force-recreate flag to ensure new container is created
- Add docker image prune to remove old images
- This should fix the issue where old container version is served
2025-09-10 12:01:56 +02:00
Dennis Konkol
7e603c7c54 🔧 Fix Docker Compose Deployment Issues
 Removed Obsolete Version:
- Removed deprecated 'version: 3.8' from docker-compose.prod.yml
- Docker Compose now uses latest format

 Fixed Network Configuration:
- Removed external 'proxy' network reference
- Portfolio app now only uses internal 'portfolio-network'
- No more 'undefined network proxy' error

 Fixed Environment Variables:
- Added proper environment variable exports in GitHub Actions
- All required variables now properly set during deployment
- No more 'variable not set' warnings

🎯 Deployment Issues Resolved:
- Docker Compose validation now passes
- Environment variables properly configured
- Network configuration simplified and working

🚀 Ready for Production Deployment!
2025-09-06 09:39:17 +00:00
Dennis Konkol
6695e892f7 Optimize GitHub Actions for Maximum Speed
 Self-Hosted Runner Configuration:
- All jobs now run on self-hosted runner (your server)
- No more waiting for GitHub's runners
- Much faster execution with your hardware

 Parallel Job Execution:
- Test and Security jobs run in parallel
- Build job waits for both to complete
- Significant time reduction

 Enhanced Caching:
- npm dependencies cached between runs
- Docker build caching optimized
- Only AMD64 platform for speed

 Docker Build Optimization:
- Better layer caching in Dockerfile
- Optimized build process
- Faster image creation

🎯 Performance Improvements:
- Before: ~15+ minutes (GitHub runners)
- After: ~3-5 minutes (self-hosted runner)
- Parallel execution saves additional time
- Caching reduces repeated work

🚀 Benefits:
- 3-5x faster CI/CD pipeline
- No GitHub Actions minute usage
- Better resource utilization
- Consistent performance
2025-09-06 09:14:17 +00:00
Dennis Konkol
48ec5a4bab 🔧 Fix All Docker Compose Commands
 Updated All Docker Compose References:
- package.json: docker:compose and docker:down scripts
- scripts/deploy.sh: All compose commands and checks
- scripts/monitor.sh: All compose commands
- DEPLOYMENT.md: Documentation examples
- .github/workflows/ci-cd.yml: CI/CD pipeline

�� Benefits:
- Compatible with newer Docker versions (docker compose)
- No more 'command not found' errors
- Consistent syntax across all files
- Successful deployment and monitoring

📝 Changed:
- 'docker-compose' → 'docker compose' (new syntax)
- Updated command availability checks
- Fixed all script references
2025-09-06 00:13:34 +00:00
Dennis Konkol
e3792bcb87 🔧 Fix Docker Compose Command
 Updated Docker Compose Commands:
- Changed 'docker-compose' to 'docker compose' (new syntax)
- Fixed deployment script in GitHub Actions
- Updated all compose commands in CI/CD pipeline

🎯 Benefits:
- Compatible with newer Docker versions
- No more 'command not found' errors
- Modern Docker Compose syntax
- Successful deployment pipeline
2025-09-06 00:11:40 +00:00
Dennis Konkol
10f76bd991 🔧 Fix Code Scanning Upload Error
 Replaced Code Scanning Upload:
- Removed github/codeql-action/upload-sarif (requires Code Scanning)
- Added actions/upload-artifact for Trivy results
- SARIF report saved as artifact (30 days retention)
- No more 'Code scanning not enabled' errors

🎯 Benefits:
- Trivy results still available as downloadable artifact
- No dependency on GitHub Advanced Security
- Clean CI/CD pipeline without errors
- Security reports accessible via Actions tab
2025-09-05 23:36:12 +00:00
Dennis Konkol
4dc9dcb17b 🔒 Enhanced Security without Code Scanning
 Dependabot Configuration:
- Automated dependency updates (weekly)
- Security vulnerability alerts
- GitHub Actions updates
- Automatic PR creation for updates

 Enhanced Trivy Scanning:
- Added secret scanning (credentials detection)
- Added configuration scanning (misconfigurations)
- Comprehensive security coverage

 Updated Security Policy:
- Added Dependabot to security features
- Added secret and configuration scanning
- Professional security documentation

�� Alternative to Code Scanning:
- Dependabot for dependency security
- Trivy for comprehensive scanning
- No GitHub Advanced Security needed
2025-09-05 23:31:53 +00:00
Dennis Konkol
bec5ed0f8f 🗑️ Remove manual CodeQL workflow
- Removed .github/workflows/codeql.yml
- Code scanning must be enabled via GitHub UI
- Go to: Settings → Security → Code security and analysis → Code scanning → Set up
- GitHub will create the workflow automatically
2025-09-05 23:30:21 +00:00
Dennis Konkol
248580b533 🔒 Add CodeQL Security Scanning
 CodeQL Workflow:
- Automated JavaScript/TypeScript analysis
- Runs on push/PR to production branch
- Weekly scheduled scans
- Security events reporting

🔧 Features:
- Code vulnerability detection
- Dependency security scanning
- Integration with GitHub Security tab
- Professional security posture

🎯 Combined with existing Trivy scanning for comprehensive security coverage
2025-09-05 23:28:11 +00:00
Dennis Konkol
03826be1af 🔧 Fix GitHub Actions Warnings
 Updated CodeQL Action:
- Changed from deprecated v2 to v3
- Fixes deprecation warning

 Updated Trivy Configuration:
- Added skip-version-check flag
- Suppresses version update warnings

🎯 GitHub Actions now run cleanly without warnings!
2025-09-05 23:19:19 +00:00
Dennis Konkol
62ef4deb4f 🔒 Add Pre-Push Hook & Fix GitHub Actions
 Pre-Push Hook System:
- Created scripts/pre-push.sh with comprehensive checks
- Added Git pre-push hook (.git/hooks/pre-push)
- Added npm run pre-push script
- Added npm run lint:fix script

🔧 Pre-Push Checks:
- Dependencies installation (npm ci)
- ESLint validation (npm run lint)
- Test execution (npm run test)
- Build verification (npm run build)
- Security audit (npm audit)
- TypeScript type check (tsc --noEmit)

 GitHub Actions Fix:
- Removed deprecated GHOST_API variables
- Updated environment variables to match current .env
- Fixed test and production environment setup

🎯 Benefits:
- No more failed pushes to GitHub
- All checks run locally before push
- Same checks as GitHub Actions
- Prevents broken code from reaching remote
2025-09-05 23:09:04 +00:00
Dennis Konkol
b9b3e5308d 🚀 Add automatic deployment system
- Add auto-deploy.sh script with full CI/CD pipeline
- Add quick-deploy.sh for fast development deployments
- Add Git post-receive hook for automatic deployment on push
- Add comprehensive deployment documentation
- Add npm scripts for easy deployment management
- Include health checks, logging, and cleanup
- Support for automatic rollback on failures
2025-09-05 19:47:53 +00:00
Denshooter
efcaccc0c2 chore: streamline Dockerfile and remove redundant steps 2025-02-23 17:38:14 +01:00
Denshooter
69f254c791 refactor: update environment variables and dependencies 2025-02-23 14:42:06 +01:00
Denshooter
10a27ec91f 🚀 refactor: rename job and streamline deployment steps 2025-02-21 16:51:25 +01:00
Denshooter
afce84dde0 🚀 fix: correct container name in deployment script logic 2025-02-21 16:03:02 +01:00
denshooter
c3a76c2650 Merge branch 'production' into dev 2025-02-18 19:03:50 +01:00
Denshooter
aaf15aedd5 chore: simplify deployment logging in workflow file 2025-02-18 18:45:10 +01:00
Denshooter
78c2632002 🚀 chore: add IMAGE_NAME to GITHUB_ENV for deployment workflow 2025-02-18 18:35:24 +01:00
denshooter
7c41eb2d1a 🚀 refactor: simplify deployment process in workflow file (#40) 2025-02-18 14:46:16 +01:00
Denshooter
eb999a70c6 🚀 refactor: simplify deployment process in workflow file 2025-02-18 14:35:33 +01:00
denshooter
59fcaf4cc5 Delete .github/workflows/linter.yml 2025-02-18 14:04:57 +01:00
denshooter
3c26e00d9b Dev (#39)
*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

* D branch 1 (#32)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

* 🚀 fix: update Docker run commands to use specific network

* D branch 1 (#34)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

* 🚀 fix: update Docker run commands to use specific network

*  fix: add error handling for invalid project data

* D branch 2 (#35)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

*  fix: format code for better readability in Contact and Footer components

* D branch 2 (#36)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

*  fix: format code for better readability in Contact and Footer components

* 🚀 fix: update Docker commands and remove hardcoded API URL

* Update main.yml

* Update main.yml

* Update main.yml

* D branch 1 (#37)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

*  feat: display base URL in Hero component

* Update main.yml

* Update next.config.ts

* next.config.ts aktualisieren

* Update main.yml

*  chore: refactor environment variable handling in workflow

*  chore: update GitHub Actions workflow for improved security and caching

* 🚀 chore: update Trivy action version and enhance config

*  chore: update GitHub Actions workflows and add linter

* 🚫 chore: remove Docker image vulnerability scan step

*  chore: update environment variable logging in workflow

*  chore: add dynamic environment for deployment jobs

* 🚀 chore: set deployment environment to GitHub ref name

* 🎉 chore: remove environment variable exposure in CI/CD

*  chore: remove sensitive environment variable logging and update variable references

*  chore: log environment variables for debugging purposes

*  chore: create .env file for environment variables setup

*  feat: copy .env file to Docker image for config

*  refactor: update environment variables to public scope

*  chore: remove environment variable from Hero component

*  fix: update environment variable references in workflow

*  chore: add folder structure display to workflow steps

*  chore: reorder CI steps for improved workflow clarity

*  fix: remove unnecessary console logs and correct base URL variable

* 🚀 feat: add GitHub Actions for deployment and testing workflows

*  chore: add branch filters for workflows in YAML files
2025-02-18 14:02:39 +01:00
denshooter
0cbec0bb19 Dev (#38)
*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

* D branch 1 (#32)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

* 🚀 fix: update Docker run commands to use specific network

* D branch 1 (#34)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

* 🚀 fix: update Docker run commands to use specific network

*  fix: add error handling for invalid project data

* D branch 2 (#35)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

*  fix: format code for better readability in Contact and Footer components

* D branch 2 (#36)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

*  fix: format code for better readability in Contact and Footer components

* 🚀 fix: update Docker commands and remove hardcoded API URL

* Update main.yml

* Update main.yml

* Update main.yml

* D branch 1 (#37)

* full upgrade (#31)

*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow

*  feat: display base URL in Hero component

* Update main.yml

* Update next.config.ts

* next.config.ts aktualisieren

* Update main.yml

*  chore: refactor environment variable handling in workflow

*  chore: update GitHub Actions workflow for improved security and caching

* 🚀 chore: update Trivy action version and enhance config

*  chore: update GitHub Actions workflows and add linter

* 🚫 chore: remove Docker image vulnerability scan step

*  chore: update environment variable logging in workflow

*  chore: add dynamic environment for deployment jobs

* 🚀 chore: set deployment environment to GitHub ref name

* 🎉 chore: remove environment variable exposure in CI/CD

*  chore: remove sensitive environment variable logging and update variable references

*  chore: log environment variables for debugging purposes

*  chore: create .env file for environment variables setup

*  feat: copy .env file to Docker image for config

*  refactor: update environment variables to public scope

*  chore: remove environment variable from Hero component

*  fix: update environment variable references in workflow

*  chore: add folder structure display to workflow steps

*  chore: reorder CI steps for improved workflow clarity

*  fix: remove unnecessary console logs and correct base URL variable
2025-02-17 09:58:58 +01:00
Denshooter
180b9aa9f8 full upgrade (#31)
*  chore: update CI workflow to include testing and multi-arch build (#29)

*  chore: remove unused dependencies from package-lock.json and updated to a better local dev environment (#30)

*  test: add unit tests

*  test: add unit tests for whole project

*  feat: add whatwg-fetch for improved fetch support

*  chore: update Node.js version to 22 in workflow

*  refactor: update types and improve email handling tests

*  refactor: remove unused imports

*  fix: normalize image name to lowercase in workflows

*  fix: ensure Docker image names are consistently lowercase

*  chore: update

*  chore: update base URL to use secret variable

*  chore: update to login to ghcr

*  fix: add missing 'fi' to close if statement in workflow
2025-02-16 16:36:21 +01:00
Denshooter
0ca6b610a4 feat: update Docker setup and enhance error handling (#19) 2025-02-13 14:23:40 +01:00
Denshooter
b87b1d6237 refactor: use environment variable for GHOST_API_KEY
Replace hardcoded GHOST_API_KEY with process.env.GHOST_API_KEY in 
API routes to enhance security. Update Docker commands in the CI 
workflow to pass the GHOST_API_KEY as an environment variable. 
Add GHOST_API_KEY to the Next.js configuration for consistent 
access across the application.
2025-02-12 17:30:31 +01:00
Denshooter
e1cd000442 update GitHub Actions workflow to use actions/checkout@v4 and improve container management 2025-02-10 16:05:50 +01:00
Denshooter
65cbab94c7 update port configurations in GitHub Actions workflow 2025-02-10 15:58:12 +01:00
Denshooter
82953ea1b3 update bug fix 2025-02-10 15:27:39 +01:00
Denshooter
a7d980d68a Update main.yml 2025-02-10 11:19:21 +01:00
Denshooter
4b5711337e Create main.yml 2025-02-10 11:04:45 +01:00