Awesome Docker Compose samples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
awesome-compose/react-express-mongodb/compose.yaml

47 lines
807 B

services:
frontend:
build:
context: frontend
target: development
ports:
- 3000:3000
stdin_open: true
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
restart: always
networks:
- react-express
depends_on:
- backend
backend:
restart: always
build:
context: backend
target: development
volumes:
- ./backend:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- mongo
networks:
- express-mongo
- react-express
expose:
- 3000
mongo:
restart: always
image: mongo:4.2.0
volumes:
- mongo_data:/data/db
networks:
- express-mongo
expose:
- 27017
networks:
react-express:
express-mongo:
volumes:
mongo_data: