🔧 Fix GitHub Actions CI/CD pipeline and improve project structure

- Split CI workflow into separate backend and admin testing jobs
- Fix package-lock.json caching issues with proper cache paths
- Update Docker configuration for better CI/CD integration
- Improve root package.json with comprehensive npm scripts
- Add proper build and test scripts for all components
- Fix Dockerfile to work correctly with GitHub Actions
- Add Docker BuildKit support for faster builds
- Organize project structure with deployment folder

This fixes the GitHub Actions error about missing package-lock.json
and improves the overall CI/CD pipeline for the project.
This commit is contained in:
Alvin-Zilverstand
2026-01-19 10:05:57 +01:00
parent 8e446a1339
commit 50c0648476
5 changed files with 95 additions and 30 deletions

View File

@@ -8,11 +8,27 @@
"dev": "cd backend && npm run dev",
"admin": "cd admin && npm start",
"setup": "npm run setup:backend && npm run setup:admin",
"setup:backend": "cd backend && npm install",
"setup:admin": "cd admin && npm install",
"test": "echo 'Tests not implemented yet'",
"build": "echo 'Build complete - ready for deployment'",
"docs": "echo 'See docs/TECHNICAL_DOCUMENTATION.md for full documentation'"
"setup:backend": "cd backend && npm ci",
"setup:admin": "cd admin && npm ci",
"test": "node test_system.js",
"test:backend": "cd backend && npm test",
"test:admin": "cd admin && npm test",
"build": "npm run build:backend && npm run build:admin",
"build:backend": "cd backend && npm run build",
"build:admin": "cd admin && npm run build",
"lint": "npm run lint:backend && npm run lint:admin",
"lint:backend": "cd backend && npm run lint",
"lint:admin": "cd admin && npm run lint",
"audit": "npm run audit:backend && npm run audit:admin",
"audit:backend": "cd backend && npm audit --audit-level=high",
"audit:admin": "cd admin && npm audit --audit-level=high",
"docs": "echo 'See docs/TECHNICAL_DOCUMENTATION.md for full documentation'",
"clean": "npm run clean:backend && npm run clean:admin",
"clean:backend": "cd backend && rm -rf node_modules",
"clean:admin": "cd admin && rm -rf node_modules",
"docker:build": "docker build -f deployment/docker/Dockerfile -t snowworld-narrowcasting .",
"docker:run": "docker run -d -p 3000:3000 --name snowworld snowworld-narrowcasting",
"docker:compose": "docker-compose -f deployment/docker/docker-compose.yml up -d"
},
"keywords": [
"narrowcasting",