server {
  listen 80;
  # server_name xx.com

  location / {
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_pass http://frontend:3000;
    proxy_redirect off;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    # root /usr/share/nginx/html;
    # index index.html index.htm;
    # try_files $uri /index.html =404;
  }

   location ^~ /api/ {
#  location /api {
    proxy_pass http://backend:8888/api;
  }

  # include /etc/nginx/extra-conf.d/*.conf;
}