awesome-compose/react-express-mongodb/.docker/docker-compose.yaml
Stefan Scherer 6f15838d24
react-express-mongodb: remove container_name to allow multiple apps in parallel (#310)
Remove `container_name` to allow multiple apps without conflict.

Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2022-12-08 16:21:16 -05:00

43 lines
742 B
YAML

services:
frontend:
build:
context: frontend
target: dev-envs
ports:
- 3000:3000
stdin_open: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
restart: always
networks:
- react-express
depends_on:
- backend
backend:
restart: always
build:
context: backend
target: dev-envs
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- mongo
networks:
- express-mongo
- react-express
expose:
- 3000
mongo:
restart: always
image: mongo:4.2.0
volumes:
- ./data:/data/db
networks:
- express-mongo
expose:
- 27017
networks:
react-express:
express-mongo: