mirror of
https://github.com/Alvin-Zilverstand/narrow_casting_system.git
synced 2026-03-06 13:24:46 +01:00
🔧 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user