diff --git a/DockerFIle b/DockerFIle new file mode 100644 index 0000000..b5b3a85 --- /dev/null +++ b/DockerFIle @@ -0,0 +1,23 @@ +# - Comment, ignored by docker +# - Docker Directives/instructions will be in UPPER CASE +# FROM -> used for specifying base image +FROM node:22-alpine AS build + +# RUN -> run commands +RUN mkdir /lms-app + +# WORKDIR -> set project path +WORKDIR /lms-app + +# COPY -> used for copying files from HOST to YOUR CUSTOM IMAGE +COPY . /lms-app + +# Prepare Build +RUN npm install +RUN npm run build + +# Prepare Deployment +FROM nginx:alpine + +# Copy Build Artifacts +COPY --from=build /lms-app/build /usr/share/nginx/html diff --git a/package.json b/package.json index 5ffa878..2fa7c32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lms-react", - "version": "1.1", + "version": "2.1", "private": true, "dependencies": { "@testing-library/dom": "^10.4.0", diff --git a/src/components/FrontPage.js b/src/components/FrontPage.js index 1b72131..4a9c1f7 100644 --- a/src/components/FrontPage.js +++ b/src/components/FrontPage.js @@ -20,7 +20,7 @@ const FrontPage = () => { return (