upstream ui { server ui:8080; } upstream api { server api:3000; } server { listen 80 default_server; server_name _; error_log /dev/stderr; access_log /dev/stdout; location / { proxy_pass http://ui; } location /api/ { proxy_pass http://api; } }