At the moment both backend and frontend are running in the same container.
It would be great to have them separated. For example, docker-compose.yml would look like:
version: "3.8"
services:
backend:
build: ./server
depends_on:
- db
ports:
- 8082:80
environment:
profile: prod
frontend:
build:
context: ./webapp
args:
profile: prod
REACT_APP_API_URL: http://localhost:8082
depends_on:
- backend
ports:
- 8080:80
db:
image: mongo:6.0.3
container_name: db
environment:
MONGO_INITDB_DATABASE: tech
volumes:
- ./init-db.js:/docker-entrypoint-initdb.d/init.js
Backend and frontend have their own Dockerfile and can be built and restarted independently.
At the moment both backend and frontend are running in the same container.
It would be great to have them separated. For example,
docker-compose.ymlwould look like:Backend and frontend have their own
Dockerfileand can be built and restarted independently.