Commit c48d3fb6 authored by TokaKaram's avatar TokaKaram

docker file setup

parent eab1139a
# -----------------------------
# Stage 1: Build the React Vite app
# -----------------------------
FROM node:20 AS build
WORKDIR /app
# Copy package files and install dependencies
COPY package*.json ./
RUN npm install
# Copy the rest of the project
COPY . .
# Build the project for production (output goes to /app/dist)
RUN npm run build
# -----------------------------
# Stage 2: Serve with Nginx
# -----------------------------
FROM nginx:alpine
# Remove default Nginx static files
RUN rm -rf /usr/share/nginx/html/*
# Copy the build output from Stage 1 to Nginx's html folder
COPY --from=build /app/dist /usr/share/nginx/html
# Copy custom Nginx config (optional, only if you have one)
# COPY nginx.conf /etc/nginx/conf.d/default.conf
# Expose port 80
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]
...@@ -26,7 +26,8 @@ export const lessons_data = [ ...@@ -26,7 +26,8 @@ export const lessons_data = [
duration: '18:05', duration: '18:05',
tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'], tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'],
thumbnail: '/assets/thumbnails/lesson-2.jpg', thumbnail: '/assets/thumbnails/lesson-2.jpg',
videoUrl: '/videos/lesson-2.mp4', videoUrl:
'/رحلة الكافيين داخل جسم الانسان ! - شارع العلوم (1080p, h264).mp4',
}, },
{ {
id: 3, id: 3,
...@@ -37,7 +38,8 @@ export const lessons_data = [ ...@@ -37,7 +38,8 @@ export const lessons_data = [
duration: '15:42', duration: '15:42',
tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'], tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'],
thumbnail: '/assets/thumbnails/lesson-3.jpg', thumbnail: '/assets/thumbnails/lesson-3.jpg',
videoUrl: '/videos/lesson-3.mp4', videoUrl:
'/رحلة الكافيين داخل جسم الانسان ! - شارع العلوم (1080p, h264).mp4',
}, },
{ {
id: 4, id: 4,
...@@ -48,7 +50,8 @@ export const lessons_data = [ ...@@ -48,7 +50,8 @@ export const lessons_data = [
duration: '12:30', duration: '12:30',
tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'], tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'],
thumbnail: '/assets/thumbnails/lesson-4.jpg', thumbnail: '/assets/thumbnails/lesson-4.jpg',
videoUrl: '/videos/lesson-4.mp4', videoUrl:
'/رحلة الكافيين داخل جسم الانسان ! - شارع العلوم (1080p, h264).mp4',
}, },
{ {
id: 5, id: 5,
...@@ -59,7 +62,8 @@ export const lessons_data = [ ...@@ -59,7 +62,8 @@ export const lessons_data = [
duration: '22:11', duration: '22:11',
tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'], tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'],
thumbnail: '/assets/thumbnails/lesson-5.jpg', thumbnail: '/assets/thumbnails/lesson-5.jpg',
videoUrl: '/videos/lesson-5.mp4', videoUrl:
'/رحلة الكافيين داخل جسم الانسان ! - شارع العلوم (1080p, h264).mp4',
}, },
{ {
id: 6, id: 6,
...@@ -70,7 +74,8 @@ export const lessons_data = [ ...@@ -70,7 +74,8 @@ export const lessons_data = [
duration: '09:50', duration: '09:50',
tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'], tags: ['تأثير القوى', 'القوى المتزنة', 'القوى الغير متزنة'],
thumbnail: '/assets/thumbnails/lesson-6.jpg', thumbnail: '/assets/thumbnails/lesson-6.jpg',
videoUrl: '/videos/lesson-6.mp4', videoUrl:
'/رحلة الكافيين داخل جسم الانسان ! - شارع العلوم (1080p, h264).mp4',
}, },
{ {
id: 7, id: 7,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment