events {
    worker_connections 1024;
}
http
{

    server {
        listen      8080;
        listen      [::]:8080;
        server_name localhost;

        location /artists/ {
            proxy_pass       http://artists_srv:8001/artists/;
            proxy_set_header Host      $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

        location /artists/docs {
            proxy_pass       http://artists_srv:8001/docs;
            proxy_set_header Host      $host;
        }

        location /paints/docs {
            proxy_pass       http://paints_srv:8002/docs;
            proxy_set_header Host      $host;
        }

        location /paints/ {
            proxy_pass       http://paints_srv:8002/paints/;
            proxy_set_header Host      $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

    }
}