version: "3.9"
services:
  back:
    build:
      context: ${ROOT_PATH}/back
    restart: always
    ports:
      - "8000:8000"
    volumes:
      - ${ROOT_PATH}/back/app:/code/app
      - ${ROOT_PATH}/back/media:/code/media

  front:
    build:
      context: ${ROOT_PATH}/front
    restart: always
    ports:
      - "4200:4200"
    volumes:
      - ${ROOT_PATH}/front/app/src:/app/src
      - ${ROOT_PATH}/front/app/public:/app/public

  nginx:
    build:
      context: ${ROOT_PATH}/nginx
    restart: always
    ports:
      - "3820:80"

  mongo:
    image: "mongo:4.4.18"
    restart: always
    ports:
      - "27017:27017"
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: IBO3eber0mdw2R9pnInLdtFykQFY2f06
    volumes:
    - database:/data/db

volumes:
  database:
