updated Dockerfile build process
This commit is contained in:
14
Dockerfile
14
Dockerfile
@ -3,19 +3,27 @@ FROM node:20 AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY package-lock.json ./
|
||||
# Copy package.json and package-lock.json to the WORKDIR
|
||||
COPY frontend/package.json ./
|
||||
COPY frontend/package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
COPY . ./
|
||||
# Copy the rest of the frontend files to the WORKDIR
|
||||
COPY frontend/. ./
|
||||
|
||||
# Build the React app
|
||||
RUN npm run build
|
||||
|
||||
# Step 2: Serve the app
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy the built files from the build stage to the Nginx web root
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Run Nginx in the foreground
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@ -18,7 +18,7 @@ const Footer = () => {
|
||||
<span>Built with React & Tailwind CSS</span>
|
||||
<span>•</span>
|
||||
<a
|
||||
href="https://github.com/TheTaqiTahmid/portfolio"
|
||||
href="https://github.com/TheTaqiTahmid/my-portfolio.git"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="hover:text-blue-600 dark:hover:text-blue-400 transition-colors"
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import React from "react";
|
||||
import { Linkedin, Github, Award } from "lucide-react";
|
||||
|
||||
const Introduction = () => {
|
||||
|
||||
Reference in New Issue
Block a user