# file: nginx.conf upstream backend { server backend:8000; } upstream frontend { server frontend:8000; } server { listen 80; server_name example.com; location / { proxy_pass http://frontend; } location /api { proxy_pass http://backend/api; } }