Skip to content

Commit 879e489

Browse files
committed
add directories
1 parent 5089db5 commit 879e489

File tree

546 files changed

+105738
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

546 files changed

+105738
-0
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

Dockerfile

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Stage 1: Build
2+
FROM node:20 AS builder
3+
4+
WORKDIR /app
5+
6+
COPY package.json .
7+
8+
RUN npm i
9+
10+
COPY . .
11+
12+
# Stage 2: Production Image
13+
14+
FROM node:alpine
15+
16+
# Creating a new directory named app
17+
WORKDIR /app
18+
19+
#Copying all the content copied in app to current directory
20+
COPY --from=builder /app .
21+
22+
# Exposing port which will be mapped with the host's port.
23+
EXPOSE 3000
24+
25+
CMD [ "npm", "start" ]

Dockerfile-json-server

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Use the official Node.js image as a base
2+
FROM node:slim
3+
4+
# Set a working directory
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json
8+
# COPY package.json .
9+
10+
# Install json-server
11+
RUN npm install -g json-server
12+
13+
# Copy your JSON files to the working directory
14+
COPY ./src/db.json .
15+
COPY ./src/Components/Admin/ReferralList/db2.json .
16+
COPY ./src/Components/Agent/Dashboard_Com/Product/db3.json .
17+
RUN ls
18+
19+
# Expose the ports for each json-server instance
20+
EXPOSE 8000
21+
EXPOSE 8001
22+
EXPOSE 8002
23+
24+
# Command to run each json-server instance when the container starts
25+
26+
CMD json-server --watch db.json --port 8000 --host 0.0.0.0 & json-server --watch db2.json --port 8001 --host 0.0.0.0 & json-server --watch db3.json --port 8002 --host 0.0.0.0

0 commit comments

Comments
 (0)