def web_spec(domain, master_ip, port, registry, tag, connection_string, google_login_client_id, google_login_client_secret, ga_tracking_id, marathon_url, marathon_login, marathon_password):
    return {
        "id": "www",
        "container": {
            "type": "DOCKER",
            "docker": {
                "image": "%s/ufaldsg/cloud-asr-web:%s" % (registry, tag),
                "network": "BRIDGE",
                "portMappings": [
                    {"containerPort": 80, "hostPort": 0}
                ]
            }
        },
        "instances": 1,
        "cpus": 0.25,
        "mem": 256,
        "env": {
            "CONNECTION_STRING": connection_string,
            "GOOGLE_LOGIN_CLIENT_ID": google_login_client_id,
            "GOOGLE_LOGIN_CLIENT_SECRET": google_login_client_secret,
            "GA_TRACKING_ID": ga_tracking_id,
            "API_URL": "http://api." + domain,
            "MARATHON_URL": marathon_url,
            "MARATHON_LOGIN": marathon_login,
            "MARATHON_PASSWORD": marathon_password,
            "MASTER_ADDR": "tcp://%s:%d" % (master_ip, port),
            "RECORDINGS_SAVER_ADDR": "tcp://%s:%d" % (master_ip, port + 5)
        },
        "dependencies": ["/%s/master" % domain]
    }
dataset/ETHPy150Open UFAL-DSG/cloud-asr/deployment/run_on_mesos.py/web_spec/original