version: '3.8' services: frontend: container_name: frontend build: ./frontend command: ng serve --host 0.0.0.0 volumes: - frontend - frontend/node_modules ports: - 4200:4200 depends_on: - service-authentication - service-message - service-privateroom links: - service-authentication - service-message - service-privateroom service-authentication: container_name: service-authentication build: ./backend/service-authentication command: node server.js volumes: - backend/service-authentication - backend/service-authentication/node_modules - backend/service-authentication/keys ports: - 3000:3000 depends_on: - mongodb-authentication links: - mongodb-authentication environment: NODE_ENV: production service-message: container_name: service-message build: ./backend/service-message command: node server.js volumes: - backend/service-message - backend/service-message/node_modules ports: - 3001:3001 depends_on: - mongodb-message links: - mongodb-message - service-authentication environment: NODE_ENV: production service-privateroom: container_name: service-privateroom build: ./backend/service-privateroom command: node server.js volumes: - backend/service-privateroom - backend/service-privateroom/node_modules ports: - 3002:3002 depends_on: - mongodb-privateroom links: - mongodb-privateroom - service-authentication environment: NODE_ENV: production mongodb-authentication: image: mongo container_name: mongodb-authentication volumes: - ./backend/service-authentication/database:/data/db-authentication ports: - 27017:27017 mongodb-message: image: mongo container_name: mongodb-message volumes: - ./backend/service-message/database:/data/db-message ports: - 27020:27017 mongodb-privateroom: image: mongo container_name: mongodb-privateroom volumes: - ./backend/service-privateroom/database:/data/db-privateroom ports: - 27021:27017