be8875c9b6
The goal here is to keep the same structure than the other examples. Also, considering that it has a "frontend" folder, the equivalent for the server should be "backend". Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
48 lines
851 B
YAML
48 lines
851 B
YAML
version: "3.7"
|
|
services:
|
|
frontend:
|
|
build:
|
|
context: frontend
|
|
args:
|
|
FRONT_END_PORT: 5000
|
|
ports:
|
|
- 5000:5000
|
|
stdin_open: true
|
|
volumes:
|
|
- ./frontend:/usr/src/app
|
|
- /usr/src/app/node_modules
|
|
container_name: frontend
|
|
restart: always
|
|
networks:
|
|
- react-express
|
|
depends_on:
|
|
- backend
|
|
|
|
backend:
|
|
container_name: backend
|
|
restart: always
|
|
build:
|
|
context: backend
|
|
args:
|
|
NODE_PORT: 3000
|
|
volumes:
|
|
- ./backend:/usr/src/app
|
|
- /usr/src/app/node_modules
|
|
depends_on:
|
|
- mongo
|
|
networks:
|
|
- express-mongo
|
|
- react-express
|
|
|
|
mongo:
|
|
container_name: mongo
|
|
restart: always
|
|
image: mongo:4.2.0
|
|
volumes:
|
|
- ./data:/data/db
|
|
networks:
|
|
- express-mongo
|
|
networks:
|
|
react-express:
|
|
express-mongo:
|