Skip to content

Commit

Permalink
Merge pull request #423 from agarwalhimanshugaya/master
Browse files Browse the repository at this point in the history
add docker-compose file
  • Loading branch information
Satyam1923 authored Jun 24, 2024
2 parents f6a9637 + c5ecdb2 commit d8135de
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
version: '3'
services:
front:
build:
context: './frontend'
dockerfile: Dockerfile
ports:
- 3000:3000
container_name: react-container
command: npm start
networks:
- mern-stack-network
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
backend:
build:
context: './backend'
dockerfile: Dockerfile
ports:
- 3030:3030
container_name: express-container
command: /app/node_modules/.bin/nodemon server.jsntainer

networks:
- mern-stack-network
volumes:
- ./backend:/app
- /app/node_modules
depends_on:
- mongo
env_file: ./server/.env
environment:
- NODE_ENV=development
mongo:
image: mongo
ports:
- 27017:27017
container_name: mongo-container
networks:
- mern-stack-network
volumes:
- mongoData:/data/db

networks:
mern-stack-network:
volumes:
mongoData:
node_modules:
web_root:
driver: local

0 comments on commit d8135de

Please sign in to comment.