Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
dockerfile added to client and server
- Loading branch information
Showing
4 changed files
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM node:16-alpine | ||
WORKDIR '/app' | ||
|
||
COPY package.json . | ||
RUN npm install | ||
COPY . . | ||
|
||
CMD ["npm","start"] | ||
|
||
|
||
|
||
# if facing error while building image, paste there two command in terminal. | ||
|
||
# export DOCKER_BUILDKIT=0 | ||
# export COMPOSE_DOCKER_CLI_BUILD=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: "3" | ||
services: | ||
react-app: | ||
restart: always | ||
build: | ||
context: ./client | ||
dockerfile: Dockerfile | ||
image: react-app | ||
stdin_open: true | ||
ports: | ||
- "3000:3000" | ||
networks: | ||
- mern-app | ||
volumes: | ||
- ./client/src:/app/src | ||
- ./app/node_modules | ||
|
||
api-server: | ||
restart: always | ||
build: | ||
context: ./server | ||
dockerfile: Dockerfile | ||
image: api-server | ||
ports: | ||
- "5000:5000" | ||
networks: | ||
- mern-app | ||
volumes: | ||
- ./server:/app | ||
- ./app/node_modules | ||
|
||
networks: | ||
mern-app: | ||
driver: bridge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM node:16-alpine | ||
WORKDIR '/app' | ||
|
||
COPY package.json . | ||
RUN npm install | ||
|
||
COPY . . | ||
|
||
|
||
|
||
CMD ["npm", "run", "dev"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ef7fe7c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
doc-talk – ./
doc-talk69.vercel.app
doc-talk-itsroy69.vercel.app
doc-talk-git-main-itsroy69.vercel.app