# -----------------------------------------------------------------------------
# Docker Compose Configuration for Risk by Context™.
# -----------------------------------------------------------------------------
# Copyright (c) 2025 asvin GmbH
#
services:
  asvin-rbc-portal:
    image: asvin-rbc-portal:latest
    deploy:
      replicas: 1
    ports:
      - "8080:80"
    networks:
      - asvin-rbc
    restart: unless-stopped
  asvin-rbc-device-service:
    image: asvin-rbc-device-service:latest
    deploy:
      replicas: 1
    environment:
      - MongoConnection__ConnectionString=mongodb://changeusername:changemepassword@asvin-rbc-mongo:27017/?authSource=admin
      - MongoConnection__Database=asvin_rbc_local
      - JsonWebTokenKeys__IssuerSigningKey="change-json-web-token-key"
      - Serilog__WriteTo__0__Args__databaseUrl=mongodb://changeusername:changemepassword@asvin-rbc-mongo:27017/asvin_rbc_local?authSource=admin
    ports:
      - "5001:5001"
    networks:
      - asvin-rbc
    restart: unless-stopped
  asvin-rbc-mongo:
    image: mongo:6.0.6
    command: --dbpath /data/db
    environment:
      - MONGO_INITDB_ROOT_USERNAME=changeusername
      - MONGO_INITDB_ROOT_PASSWORD=changemepassword
    volumes:
      - ./rbc-data/context:/data/db
    ports:
      - "27017:27017"
    networks:
      - asvin-rbc
    restart: unless-stopped

networks:
  asvin-rbc:
    name: asvin-rbc
    driver: bridge
