# SPDX-License-Identifier: MIT

services:
    oai_enb0:
        image: ${REGISTRY-oaisoftwarealliance/}${ENB_IMG:-oai-enb}:${TAG:-develop}
        privileged: true
        container_name: rfsim4g-oai-enb
        networks:
            public_net:
                ipv4_address: 192.168.61.20
        environment:
            TZ: Europe/Paris
            ASAN_OPTIONS: detect_leaks=0
            USE_ADDITIONAL_OPTIONS: --rfsim --noS1 --log_config.global_log_options level,nocolor,time
        volumes:
            - ../../conf_files/enb.band7.tm1.25prb.rfsim.mbms.conf:/opt/oai-enb/etc/enb.conf
        healthcheck:
            test: /bin/bash -c "pgrep lte-softmodem"
            interval: 10s
            timeout: 5s
            retries: 5

    oai_ue0:
        image: ${REGISTRY-oaisoftwarealliance/}${LTEUE_IMG:-oai-lte-ue}:${TAG:-develop}
        privileged: true
        container_name: rfsim4g-oai-lte-ue0
        networks:
            public_net:
                ipv4_address: 192.168.61.30
        expose:
            - "10000"
            - "8888"
            - "9999"
        environment:
            TZ: Europe/Paris
            HOSTNAME: oai_ue0
            ASAN_OPTIONS: detect_leaks=0
            USE_ADDITIONAL_OPTIONS: -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --rfsim --noS1 --rfsimulator.[0].serveraddr 192.168.61.20 --log_config.global_log_options level,nocolor,time --noS1
        volumes:
            - ../../conf_files/lteue.usim-mbs.conf:/opt/oai-lte-ue/etc/ue_usim.conf
            - ../../conf_files/lteue.rfsim.conf:/opt/oai-lte-ue/etc/ue.conf
        healthcheck:
            test: /bin/bash -c "pgrep lte-uesoftmodem"
            interval: 10s
            timeout: 5s
            retries: 5

networks:
    public_net:
        name: rfsim4g-oai-public-net
        ipam:
            config:
                - subnet: 192.168.61.0/26
        driver_opts:
            com.docker.network.bridge.name: "rfsim4g-public"
