diff --git a/Docker b/Docker new file mode 100644 index 0000000..f96398d --- /dev/null +++ b/Docker @@ -0,0 +1,17 @@ +# Node Block + +FROM node:alpine3.16 as node +WORKDIR /Easy-Consulting-react +COPY package.json . +RUN npm install --legacy-peer-deps +COPY . . +RUN npm run build + + +# Nginx Block + +FROM nginx:1.23-alpine +WORKDIR /usr/share/nginx/html +RUN rm -rf ./* +COPY --from=node /Easy-Consulting-react/build . +ENTRYPOINT [ "nginx", "-g", "daemon off;" ] diff --git a/README.md b/README.md index 1d72f84..4413548 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,26 @@ _Below is an example of how you can instruct your audience on installing and set ```sh yarn start ``` +4. Start the docker + ```sh + docker build -t Easy-Consulting-react. + ``` + ```sh + docker image + ``` + ```sh + docker run -d --name Easy-Consulting-react -p 3000:80 Easy-Consulting-react + ``` + ```sh + docker ps + ``` + or + ```sh + docker-compose up # to start service + docker-compose down # to stop service + ``` + Note: Service will be start at http://localhost:3000/ +

For this project you have to create firebase console for authentication , mongodb for database and stripe for payment gateway.

After then put all the credential env file respectly for backend keep them in root folder

create a jsx file in root and add here firbase config info

diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d20bc7a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3.8' +services: + web: + container_name: Easy-Consulting-react + build: . + ports: + - 3000:80