def recordings_spec(domain, master_ip, port, registry, tag, connection_string):
    return {
        "id": "recordings",
        "container": {
            "type": "DOCKER",
            "docker": {
                "image": "%s/ufaldsg/cloud-asr-recordings:%s" % (registry, tag),
                "network": "BRIDGE",
                "portMappings": [
                    {"containerPort": 80, "hostPort": 0},
                    {"containerPort": 5682, "hostPort": port + 5}
                ]
            },
            "volumes": [
                {"containerPath": "/opt/app/static/data", "hostPath": "/mnt/h/cloudasr_recordings", "mode": "RW"}
            ]
        },
        "instances": 1,
        "cpus": 0.25,
        "mem": 256,
        "env": {
            "CONNECTION_STRING": connection_string,
            "STORAGE_PATH": "/opt/app/static/data",
            "DOMAIN": "http://recordings." + domain
        },
        "constraints": [["hostname", "LIKE", master_ip]]
    }
dataset/ETHPy150Open UFAL-DSG/cloud-asr/deployment/run_on_mesos.py/recordings_spec/original