upstream contract_registry {
    ip_hash;
    server app:8000;
}

server {
    server_name contract_registry;
    listen 8080;

    client_max_body_size 10M;

    proxy_connect_timeout   60;
    proxy_send_timeout      60;
    proxy_read_timeout      60;
    send_timeout            60;

    location / {
        proxy_pass http://contract_registry/;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
