Skip to content

Added docker file to start with docker #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Docker
Original file line number Diff line number Diff line change
@@ -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;" ]
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/

<p align="left">For this project you have to create firebase console for authentication , mongodb for database and stripe for payment gateway.</p>
<p>After then put all the credential env file respectly for backend keep them in root folder</p>
<p>create a jsx file in root and add here firbase config info</p>
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3.8'
services:
web:
container_name: Easy-Consulting-react
build: .
ports:
- 3000:80