🔧 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

@@ -6,16 +6,32 @@ FROM node:18-alpine
# Set working directory
WORKDIR /app
# Copy package files
# Copy root package files
COPY package*.json ./
# Copy backend package files
COPY backend/package*.json ./backend/
COPY backend/ ./backend/
# Copy admin package files
COPY admin/package*.json ./admin/
COPY admin/ ./admin/
# Copy client files
COPY client/ ./client/
COPY docs/ ./docs/
COPY deployment/ ./deployment/
# Install dependencies
RUN npm run setup:backend && npm run setup:admin
RUN cd backend && npm ci && cd ..
RUN cd admin && npm ci && cd ..
# Copy application code
COPY . .
COPY test_system.js ./
COPY README.md ./
COPY PROJECT_SUMMARY.md ./
COPY CONTRIBUTING.md ./
COPY .env.example ./
# Create necessary directories
RUN mkdir -p database logs public/uploads/images public/uploads/videos