|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +upstream superset_app { |
| 19 | + server host.docker.internal:8088; |
| 20 | + keepalive 100; |
| 21 | +} |
| 22 | + |
| 23 | +upstream superset_websocket { |
| 24 | + server host.docker.internal:8080; |
| 25 | + keepalive 100; |
| 26 | +} |
| 27 | + |
| 28 | +server { |
| 29 | + listen 80 default_server; |
| 30 | + server_name _; |
| 31 | + |
| 32 | + location /ws { |
| 33 | + proxy_pass http://superset_websocket; |
| 34 | + proxy_http_version 1.1; |
| 35 | + proxy_set_header Upgrade $http_upgrade; |
| 36 | + proxy_set_header Connection "Upgrade"; |
| 37 | + proxy_set_header Host $host; |
| 38 | + } |
| 39 | + |
| 40 | + location ${SUPERSET_APP_ROOT}/static { |
| 41 | + proxy_pass http://host.docker.internal:9000; # Proxy to superset-node |
| 42 | + proxy_http_version 1.1; |
| 43 | + proxy_set_header Host $host; |
| 44 | + } |
| 45 | + |
| 46 | + location ${SUPERSET_APP_ROOT} { |
| 47 | + proxy_pass http://superset_app; |
| 48 | + proxy_set_header Host $http_host; |
| 49 | + proxy_set_header X-Real-IP $remote_addr; |
| 50 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 51 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 52 | + proxy_http_version 1.1; |
| 53 | + port_in_redirect off; |
| 54 | + proxy_connect_timeout 300; |
| 55 | + } |
| 56 | + |
| 57 | +} |
0 commit comments