When we will need to build our containers, docker-compose.dev.yml or docker-compose.prod.yml we need to create diferents files
version: "3.9"
services:
reactapp:
container_name: reactapp
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "8000:80"
volumes:
- ./src:/app/src
environment:
- CHOKIDAR_USEPOLLING=true
version: "3.9"
services:
reactapp:
container_name: reactapp
build:
context: .
dockerfile: Dockerfile.prod
ports:
- "8080:80"